Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to change Content-Type header in REST Client

Hello!
I am using REST Client to send a REST requests to Microsofts OneDrive.
You can check the picture about how my request looks in the REST Client.
When I run it, this is what I am getting:
ID: 2
Address: https://apis.live.net/v5.0/me?access_token=EwCIAq1DBAAUGCCXc8wU/zFxxxxxxxxxxxxxxxxxxx
Http-Method: GET
Content-Type: */*
Headers: {Accept=, Content-Type=}
--------------------------------------
: org.apache.cxf.interceptor.LoggingInInterceptor - Inbound Message
----------------------------
ID: 2
Response-Code: 415
Encoding: UTF-8
Content-Type: application/json; charset=UTF-8
Headers: {Cache-Control=, Content-Length=, content-type=, Date=, P3P=,
Server=, X-AsmVersion=, X-Content-Type-Options=,
X-HTTP-Live-Request-Id=, X-MSNSERVER=}
Payload: {
"error": {
"code": "request_body_invalid_media_type",
"message": "The Content-Type header '*/*' isn't expected for this HTTP method."
}
}

In fact, it is MS that decides that the request must be send without Content-Type header:
http://social.msdn.microsoft.com/forums/onedrive/en-US/e98ee952-e698-4a54-8a14-98c69147bd06/using-th...
So, my question is how to remove this from my request? Is this actually possible?
Is there is another way to send REST requests in the ESB version?
I tried to send REST request with the non-ESB REST sender, but it cannot be deployed on the ESB version.
Thank you very much!
Kind regards,
Stanislav Ivanov
0683p000009ME7Y.jpg
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello!
After some playing around, I managed to use the tRESTClient.
In order to change the content-type, you should simply add it to the "HTTP Header" in "Advanced Settings".
Check the photo I am attaching.
0683p000009MEGy.jpg

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hello!
After some playing around, I managed to use the tRESTClient.
In order to change the content-type, you should simply add it to the "HTTP Header" in "Advanced Settings".
Check the photo I am attaching.
0683p000009MEGy.jpg