Skip to content
Advertisement

PHP cURL GET Request to REST API not returning anything

I’m trying to use the UMLS Search REST API. I successfully retrieved the TGT and The ST. However, when trying to do a search as mentioned in the documentations, I got no response at all. Here’s my code:

JavaScript

Advertisement

Answer

The API expects a GET request, but using curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $params); is changing the request type to POST. removing this command and adding the parameters directly to the URL fixes the problem.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement