UTILITY

http_post()

Perform a POST request with cURL.

Signature

array http_post(string $url, mixed $body = null, array $options = [])

Example

$r = http_post('https://example.com/api', ['name'=>'Ada']);

Extension: curl

Available from: 1.5.0

Reference navigation

Previous: http_patch()

Next: http_put()

Back to utilities