USER_DEFINED_HANDLER
USER_DEFINED_HANDLER = 'userDefined'
Used to identify handler defined by client code Maybe useful in the future.
Class Http.
$client : \GuzzleHttp\Client
Http client.
get(string $url, array $options = array()) : \Psr\Http\Message\ResponseInterface
GET request.
| string | $url | |
| array | $options |
post(string $url, array|string $options = array()) : \Psr\Http\Message\ResponseInterface
POST request.
| string | $url | |
| array|string | $options |
json(string $url, string|array $options = array(), integer $encodeOption = JSON_UNESCAPED_UNICODE, array $queries = array()) : \Psr\Http\Message\ResponseInterface
JSON request.
| string | $url | |
| string|array | $options | |
| integer | $encodeOption | |
| array | $queries |
upload(string $url, array $files = array(), array $form = array(), array $queries = array()) : \Psr\Http\Message\ResponseInterface
Upload file.
| string | $url | |
| array | $files | |
| array | $form | |
| array | $queries |
setClient(\GuzzleHttp\Client $client) : \EasyWeChat\Core\Http
Set GuzzleHttp\Client.
| \GuzzleHttp\Client | $client |
getClient() : \GuzzleHttp\Client
Return GuzzleHttp\Client instance.
request(string $url, string $method = 'GET', array $options = array()) : \Psr\Http\Message\ResponseInterface
Make a request.
| string | $url | |
| string | $method | |
| array | $options |
parseJSON(\Psr\Http\Message\ResponseInterface|string $body) : mixed
| \Psr\Http\Message\ResponseInterface|string | $body |
fuckTheWeChatInvalidJSON(\Psr\Http\Message\StreamInterface|string $invalidJSON) : string
Filter the invalid JSON string.
| \Psr\Http\Message\StreamInterface|string | $invalidJSON |
getHandler() : \GuzzleHttp\HandlerStack
Build a handler.