Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When I try to access the API by giving header as "Content-Type" with Rest connector in Qlik sense. It is giving me an error saying
"Get doesn't support "Content-Type" in headers."
Please let me know to pass header Content-Type -- application/json in Qlik Sense while trying to access the API's.
Thanks,
Murali
Perhaps what you want is the Accept header? Somthing like:
Accept: application/json
to tell the server that you want json.
Hope this helps
Erik Wetterberg
I don't think you're supposed to use the content-type header for GET methods. GET method calls doesn't have any contents, so it doesn't really make sense there. You'll probably get a content-type header in your response though.
Perhaps what you want is the Accept header? Somthing like:
Accept: application/json
to tell the server that you want json.
Hope this helps
Erik Wetterberg
Where to write that code?
Hi Erik,
I have an odd situation that requires the same.
our data provider has an endpoint that accepts both a post and a get request (for different purposes)
I believe that behind the scenes (at my data source provider) a shortcut has been taken which results in a 415 error when i make a get request without the Content-Type header despite it being superfluous (as there is no content being sent).
I have checked the HTTP standard documentation here https://datatracker.ietf.org/doc/html/rfc7231#section-3.1.1.5 which seems to back up my statement.
This is all fine but it leaves me having to tell the data source provider that their api is poorly implemented and that they need to change it.
Are there any workarounds you can think of in this case?