Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
wedersoncabrla
Contributor II
Contributor II

REST Connector GET Method with Body

Hello!

I'm trying use the REST Connector to make a GET request with a XML body, but it seems that Qlik doesn't allow this option.. is there any workaround?

Making the same request with Postman  or CURL works fine. (here i add the header parameter "Content-Type application/json" that Qlik don't allow me use in GET method.)

My Request:

 

 

RestConnectorMasterTable:
SQL SELECT 
	"ack",
	"__KEY_promoCoreResponse"
FROM
	XML "promoCoreResponse" PK "__KEY_promoCoreResponse"
WITH CONNECTION (
	URL "$(vURL)",
    HTTPHEADER "Authorization" "Bearer $(vAccess_token)",
	HTTPHEADER "Accept" "*/*",
    BODY "$(vBody)"
);

 

 

My Body:

 

<promoCoreRequest>
<operation>getPromotions</operation>
<companyId>****</companyId>
<params>
</params>
</promoCoreRequest>;

 

CURL command

curl -v -X GET -H "Authorization: Bearer *****" -H "Accept: */*" -d "<promoCoreRequest><operation>getPromotions</operation><companyId>****</companyId><params></params></promoCoreRequest>" -H "Content-Type: application/json" -o "output.txt" http://****/promo/api/rest/promotions

 

Labels (2)
1 Solution

Accepted Solutions
Damien_Villaret
Support
Support

Hello,

 

A GET request with a body wouldn't be a very standard way as per the HTTP protocol standards, I believe.

It's currently not supported in the Qlik REST connector to have those kind of requests.

You could log a feature request here if you need such a feature and Qlik Product Management will review it:
https://community.qlik.com/t5/Suggest-an-Idea/idb-p/qlik-ideas

 

Best regards,

If the issue is solved please mark the answer with Accept as Solution.

View solution in original post

1 Reply
Damien_Villaret
Support
Support

Hello,

 

A GET request with a body wouldn't be a very standard way as per the HTTP protocol standards, I believe.

It's currently not supported in the Qlik REST connector to have those kind of requests.

You could log a feature request here if you need such a feature and Qlik Product Management will review it:
https://community.qlik.com/t5/Suggest-an-Idea/idb-p/qlik-ideas

 

Best regards,

If the issue is solved please mark the answer with Accept as Solution.