Hi,
I've been developing an HTTP driver where I need to build an HTTP GET request that provides a parameter named 'liveId'.
According to the API documentation, that lived needs to be an array of IDs, as shown in the figure below:
The API documentation also mentions there are 2 ways of sending query data on a request:
- one using <request_url>?<query_parameter>=<parameter_value>
- another using <request_url> only, with a JSON body "{"<query_parameter>":"<parameter_value>"}
According to DataMiner Dev Library, a GET request will always send the data inside <Data> as a query parameter and never as a request body:
I've tried multiple formats with postman to see if I can send the request with "liveId" as a query parameter, but I always get a Timeout.
The ONLY way I found it to work was with the JSON body, but that's not something I can do in DataMiner.
Therefore, I would like to know whether there is a workaround that I can use, besides sending the raw HTTP request through a serial connection defined in the protocol?
If there isn't really a workaround, what would be the standardized way of proceeding?
Do I use a Serial Connection and implement the HTTP standard myself or should I use a C# library to perform this specific request directly in the SLScripting?
Best Regards,
Have you tried using a POST command instead? Typical usage is to use GET for URL-only requests and POST for requests containing a body.
I get status code ‘404 Not Found’ when sending as a POST request instead. It really needs to be a GET request