title: How to do a post with Guzzle?
body: <p>Scrathing my head here. What is wrong with this code? The response from Expo is a 404 for some reason. I'm sending stuff to them in the wrong way but can't figure out how I should do it!. </p>
  
  <p>EXPO docs are here: <a href="https://docs.expo.io/versions/latest/guides/push-notifications#http2-api" rel="nofollow noreferrer">https://docs.expo.io/versions/latest/guides/push-notifications#http2-api</a></p>
  
  <p>My code:</p>
  
  <pre><code>$client = new Client(); //GuzzleHttp\Client
  
      $url = 'https://exp.host/--/api/v2/push/send';
  
      $data = [
          'to' =&gt; array('ExponentPushToken[gaXXXXXXXXX_Oi4J1b9OR]'),
          'title' =&gt; $notification-&gt;title,
          'body' =&gt; $notification-&gt;body
      ];
      $headers = [
          'Accept' =&gt; 'application/json',
          'Accept-Encoding' =&gt; 'gzip, deflate',
          'Content-Type' =&gt; 'application/json',
      ];
  
      $response = $client-&gt;post($url, ['form_params' =&gt; $data, 'headers' =&gt; $headers]);
  
  
      dd($response);
  </code></pre>
  
  <p>Getting the following error:</p>
  
  <pre><code>Client error: `POST https://exp.host/--/api/v2/push/send` resulted in a `404 Not Found` response: Not Found
  </code></pre>
  
  <p>NOTE: Changing 'form_params' to 'multipart' inte the guzzle post gives me a different error from expo: </p>
  
  <pre><code>A 'contents' key is required
  </code></pre>
  
  <p>And finally, changing 'form_params' to 'query' gives me:</p>
  
  <pre><code>Client error: `POST https://exp.host/--/api/v2/push/send?to%5B0%5D=ExponentPushToken%5XXXXXXXXXX_Oi4J1b9OR%5D&amp;title=asdasd&amp;body=asdasdasd` resulted in a `400 Bad Request` response: {"errors":[{"code":"API_ERROR","message":"child \"to\" fails because [\"to\" is required], \"value\" must be an array."} (truncated...)
  </code></pre>