Please login or register to access secure site features.

Note: By continuing to use DevConnect Program Services you agree to our latest Registered Member Terms.

Sign in using DevConnect ID

Forgot password?

Trouble logging in?

Submit a ticket for Registration Support.

I have an SSO ID

?
sign in

Don't have a DevConnect or SSO ID ?

Create a DevConnect account or join the program.

register now
^
New DevConnect members must have forum permissions in order to post messages.
If the Reply and New Post buttons are not available to you, please request access using a General Support request ticket.
Forum Index » Avaya Orchestration Designer » Issue with REST API call for GET method   XML
 
Author Message
ShantalaGowda2



Joined: 06/11/2013 02:23:09
Messages: 26
Offline

We have a REST API with GET request which expects Content-Type in header with value as 'application/json'. We have required setup on AOD and when we test we get error "415 Error: Unsupported Media Type".

As per backend team, Server is receiving the content-type as "application/x-www-form-urlencoded; charset=UTF-8".

We are not sure where Content-Type is getting changed even though e set it to 'application/json'.

NOTE: Request works fine if tested from SOAPUI. We see issue only when called from AOD.

Can we know what could be issue and how it can be resolved? How do we make sure AOD sends Content-Type as 'application/json'?
WilsonYu



Joined: 06/11/2013 14:29:24
Messages: 3878
Offline

The web service shouldn't care about the content-type for the GET method. OD sets it. You can't change it. Try to add the Accept header. That's what matters when web service returns JSON to the client (OD app).
ShantalaGowda2



Joined: 06/11/2013 02:23:09
Messages: 26
Offline

We have already tried adding Accept in header and still get same error.
WilsonYu



Joined: 06/11/2013 14:29:24
Messages: 3878
Offline

If you are sure the content-type is the problem, we can't really help. OD has it hard coded to send "application/x-www-form-urlencoded", which should be expected by GET method of a REST web service. You may want to write some custom JAVA code to do this on your own.
 
 
Go to: