Docs? It appears the url is incorrect
Sep 6, 2022
3
Level 1
Post request using guzzleHttp
Hi everyone, I have a problem with sending post request to an API using guzzleHttp. I'm getting an error
Client error: `POST https://h2.incocloud.com/connect/api/restaurant_order_request` resulted in a `404 Not Found` response:\n{\"Message\":\"No HTTP resource was found that matches the request URI 'https://localhost/connect/api/restaurant_order_requ (truncated...)\n",
Here's my code:
$client = new Client(['base_uri' => "https://h2.incocloud.com/connect/api/", 'headers' => [ 'Content-Type' => 'application/json' ]]);
$response = $client->request('POST', 'restaurant_order_request', ['form_params' => ['token' => $this->accessToken, 'restaurantOrderRequest' => $data])->getBody();
Maybe you could help me to find out I am getting this error?
Please or to participate in this conversation.