title: wp_remote_post() check failed using Algolia
body: <p>Have installed the Algolia plugin for my site but when it tries to run the test, it always fails with no (to me) helpful information as to why. The error message is: </p>
  
  <pre><code>Array
  (
  [headers] =&gt; Requests_Utility_CaseInsensitiveDictionary Object
      (
          [data:protected] =&gt; Array
              (
                  [server] =&gt; nginx/1.10.0 (Ubuntu)
                  [date] =&gt; Wed, 28 Sep 2016 09:20:36 GMT
                  [content-type] =&gt; text/html; charset=UTF-8
                  [expires] =&gt; Wed, 11 Jan 1984 05:00:00 GMT
                  [cache-control] =&gt; no-cache, must-revalidate, max-age=0
                  [x-frame-options] =&gt; Array
                      (
                          [0] =&gt; SAMEORIGIN
                          [1] =&gt; DENY
                      )
  
                  [location] =&gt; https://www.myhost.co.uk/directory/
                  [strict-transport-security] =&gt; max-age=15768000; includeSubDomains; preload
                  [x-content-type-options] =&gt; nosniff
              )
  
      )
  
  [body] =&gt; 
  [response] =&gt; Array
      (
          [code] =&gt; 302
          [message] =&gt; Found
      )
  
  [cookies] =&gt; Array
      (
      )
  
  [filename] =&gt; 
  [http_response] =&gt; WP_HTTP_Requests_Response Object
      (
          [response:protected] =&gt; Requests_Response Object
              (
                  [body] =&gt; 
                  [raw] =&gt; HTTP/1.1 302 Found
  Server: nginx/1.10.0 (Ubuntu)
  Date: Wed, 28 Sep 2016 09:20:36 GMT
  Content-Type: text/html; charset=UTF-8
  Transfer-Encoding: chunked
  Connection: close
  Expires: Wed, 11 Jan 1984 05:00:00 GMT
  Cache-Control: no-cache, must-revalidate, max-age=0
  X-Frame-Options: SAMEORIGIN
  Location: https://www.myhost.co.uk/directory/
  Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  
  
                  [headers] =&gt; Requests_Response_Headers Object
                      (
                          [data:protected] =&gt; Array
                              (
                                  [server] =&gt; Array
                                      (
                                          [0] =&gt; nginx/1.10.0 (Ubuntu)
                                      )
  
                                  [date] =&gt; Array
                                      (
                                          [0] =&gt; Wed, 28 Sep 2016 09:20:36 GMT
                                      )
  
                                  [content-type] =&gt; Array
                                      (
                                          [0] =&gt; text/html; charset=UTF-8
                                      )
  
                                  [expires] =&gt; Array
                                      (
                                          [0] =&gt; Wed, 11 Jan 1984 05:00:00 GMT
                                      )
  
                                  [cache-control] =&gt; Array
                                      (
                                          [0] =&gt; no-cache, must-revalidate, max-age=0
                                      )
  
                                  [x-frame-options] =&gt; Array
                                      (
                                          [0] =&gt; SAMEORIGIN
                                          [1] =&gt; DENY
                                      )
  
                                  [location] =&gt; Array
                                      (
                                          [0] =&gt; https://www.myhost.co.uk/directory/
                                      )
  
                                  [strict-transport-security] =&gt; Array
                                      (
                                          [0] =&gt; max-age=15768000; includeSubDomains; preload
                                      )
  
                                  [x-content-type-options] =&gt; Array
                                      (
                                          [0] =&gt; nosniff
                                      )
  
                              )
  
                      )
  
                  [status_code] =&gt; 302
                  [protocol_version] =&gt; 1.1
                  [success] =&gt; 
                  [redirects] =&gt; 0
                  [url] =&gt; https://www.myhost.co.uk/wp-admin/admin-post.php
                  [history] =&gt; Array
                      (
                      )
  
                  [cookies] =&gt; Requests_Cookie_Jar Object
                      (
                          [cookies:protected] =&gt; Array
                              (
                              )
  
                      )
  
              )
  
          [filename:protected] =&gt; 
          [data] =&gt; 
          [headers] =&gt; 
          [status] =&gt; 
      )
  
  )
  </code></pre>
  
  <p>I can't work out from this where the issue is - the 302 code looks OK but I'm not sure what is happening that is causing the script to fail. </p>
  
  <p>If I load the URL in a browser or using Postman, I get a 200 status code. Curl is enabled and working on my server so I'm not sure what the issue could be.</p>
  
  <p>Any help appreciated!</p>