Пример моего запроса:
Код: Выделить всё
// curl -vvv -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --cacert client-bundle.pem --key key.pem --cert cert.pem 'my_url'
Код: Выделить всё
try {
$response = $this->request('POST', 'my_url', [
'headers' => [
'Content-Type' => 'application/x-www-form-urlencoded',
'Accept' => 'application/json'
],
]);
return Json::decode($response->getBody()->getContents());
$this->checkResponse($result);
} catch (GuzzleException $e) {
return $e->getMessage();
}
Подробнее здесь: https://stackoverflow.com/questions/760 ... ing-guzzle
Мобильная версия