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

Highlighted
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.

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now