HttpClientInterface
in
Table of Contents
Methods
- post() : string
- Sends a POST request to the specified URL with the given data.
Methods
post()
Sends a POST request to the specified URL with the given data.
public
post(string $url, string $body[, array<string|int, mixed> $headers = [] ]) : string
Parameters
- $url : string
-
The URL to send the request to.
- $body : string
-
The raw request body.
- $headers : array<string|int, mixed> = []
-
Optional headers to send with the request.
Tags
Return values
string —The response body as a string.