Problem with Content-Type in API profile for a REST request

I have trouble to make Content-Type work in a API profile.

 

In Postman, the body is

{

"ProfileID":14723452

}

To get the detail of the ProfileID, I need to add Content-Type: application/json in the Headers. Without the Content-Type header parameter, the result is {ProfileID:0}.

 

in API profile, i have tried  <api:set attr="Content-Type" value="application/json" />. but it doesn't work. i can't get the profile ID detail, only profileID=0 returned.

 

Any help is welcome!

Hi LZ130337,

 

Does it work if you develop your API call using the Manage Query Profiles editor, rather than hand-coding it?

 

CK

 

Hi LZ130337,

 

Oh, that's annoying.. application/json is a perfectly valid content type. That does look like a bug to me. One to raise with our tech support please.

 

Best regards,

Ian

 

i have got an error when trying to add Content-Type header parameter using Manage Query Profiles editor :).