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

One Star

[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

Accepted Solutions
One Star

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

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.

All Replies
One Star

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

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.