{"id":14115556,"date":"2021-03-01T09:57:19","date_gmt":"2021-03-01T09:57:19","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/api-response-incorrect\/"},"modified":"2021-03-01T09:58:10","modified_gmt":"2021-03-01T09:58:10","slug":"api-response-incorrect","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/api-response-incorrect\/","title":{"rendered":"API response incorrect"},"content":{"rendered":"<p>Hi, I&#8217;m experiencing this issue: when I update manually a license from backend, and then perform an slm_check within my plugin, the result is unexpected.<br \/>\nThis is my code:<\/p>\n<p>      $api_params = array(<br \/>\n         &#8216;registered_domain&#8217; =&gt; $_SERVER[&#8216;SERVER_NAME&#8217;],<br \/>\n          &#8216;slm_action&#8217; =&gt; &#8216;slm_check&#8217;,<br \/>\n          &#8216;secret_key&#8217; =&gt; MY_SECRET_KEY,<br \/>\n          &#8216;license_key&#8217; =&gt; $options[&#8216;activationKey&#8217;]<br \/>\n      );<\/p>\n<p>      $query = esc_url_raw(add_query_arg($api_params, MY_SERVER_URL));<br \/>\n      var_dump($query);<br \/>\n      $response = wp_remote_get($query, array(&#8216;timeout&#8217; =&gt; 20, &#8216;sslverify&#8217; =&gt; false));<br \/>\n      var_dump($response);<\/p>\n<p>If I paste the url from the query in my browser, the result is ok, but the response is different, it&#8217;s the result before my manual changes.<br \/>\nThe odd thing is that if I change the order of the params in $api_params the response is ok, but only until next change. It seems like a sort of cache problem o something similar. Can you help please?<\/p>\n","protected":false},"template":"","class_list":["post-14115556","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14115556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14115556\/revisions"}],"predecessor-version":[{"id":14115562,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14115556\/revisions\/14115562"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=14115556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}