JSON does not appear at the API endpoint
-
Hello,
I have an issue which I need to resolve regarding the usage of JSON Content Importer Pro.
I am attempting to do a CURL-POST request to an API that I’ve created with endpoint
https://www.bizgraph.net/api/getDeals
using the Curloptions
CURLOPT_POSTFIELDS={“Term”: 5}I have turned debug on and in the WordPress page I get the following output regarding the JSON
DEBUG: curlPOST: timeout: 5
DEBUG: curlPOST: curl-option used from shortcode: CURLOPT_POSTFIELDS={“Term”: 5}
DEBUG: curlPOST: CURLOPT_POSTFIELDS={“Term”: 5}
DEBUG: curlPOST: key: CURLOPT_POSTFIELDS (10015)- value: {“Term”: 5}
DEBUG: curlPOST: input for CURLOPT_POSTFIELDS (10015): {“Term”: 5}
DEBUG: curlPOST, CURLOPT_POSTFIELDS (10015): valid JSON: {“Term”: 5}
DEBUG: curlPOST: curl_setopt CURLOPT_POSTFIELDS (10015) with value {“Term”: 5}
DEBUG: curlPOST: setting of valid JSON-feed at CURLOPT_POSTFIELDS (10015) successful
DEBUG: api-answer:It looks like the JSON has been validated correctly.
The JSON does not however appear at the API endpoint.
(NOTE – the request hits the endpoint and returns some test data. But I can see from the response that the no JSON arrived)I have testing the same CURL request using https://reqbin.com/req/c-dwjszac0/curl-post-json-example
And POSTed the following
curl -X POST https://www.bizgraph.net/api/product/getDeals
-H “Content-Type: application/json”
-d “{\”Term\”:5}”and the endpoint receives the JSON.
Can you please let me know whether I am doing anything wrong or whether there is an issue with your code for this type of request?
The page I need help with: [log in to see the link]
- The topic ‘JSON does not appear at the API endpoint’ is closed to new replies.