Skip to content

Instantly share code, notes, and snippets.

@achmadfatoni
Created August 29, 2017 09:21
Show Gist options
  • Save achmadfatoni/8c67cc430f4de18926c42abf24aedbc1 to your computer and use it in GitHub Desktop.
Save achmadfatoni/8c67cc430f4de18926c42abf24aedbc1 to your computer and use it in GitHub Desktop.
Guzzle Raw POST request
$client = new Client();
$array = [];
$res = $client->request('POST', $url, [
'body' => json_encode($array),
'headers' => [
'Content-Type' => 'application/json',
]
]);
@panchocasanova
Copy link

it work for me , thank you

@pifon
Copy link

pifon commented Apr 2, 2020

Found it after 3 days of swearing (and sweating). Thank you!

@faisal3956
Copy link

thanks help alot

@KyawSoeKhaing777
Copy link

Thanks @achmadfatoni, It works for me.

@SamuelMaculuve
Copy link

Thanks work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment