Answer the question
In order to leave comments, you need to log in
How to send XML body using Guzzle?
I send like this
$this->client->post($this->api_url, [
'body' => $this->createRequestBody($request->to, $request->text)
]);
createRequestBody
returns XML Answer the question
In order to leave comments, you need to log in
This is how it works
$this->client->request('POST', $this->api_url, [
'headers' => [
'Content-Type' => 'text/xml;charset=UTF-8'
],
'body' => $this->createRequestBody($request->to, $request->text)
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question