415: Unsupported Media Type during REST POST operation
0
Hi, I am starting to look into Mendix's REST capabilities: I can execute a GET But when I execute a POST, I get this error: Caused by: com.mendix.modules.microflowengine.MicroflowException: 415: Unsupported Media Type at IT4ITModule.SN_IncidentExport (CallRest : 'Call REST (POST)') The configuration is as follows: JSON Structure I mapped the attributes by name The REST Location is https://dev50842.service-now.com/api/now/table/incident?sysparm_fields=sys_id%2Cnumber%2Cshort_description%2Cimpact%2Curgency%2Copened_at%2Copened_by%2Cpriority%2Cseverity The Request is mapped using an Export map The Response is mapped as well What am I missing? Any hints are appreciated. Guislain
asked
Guislain Lagron
4 answers
3
In the tab HTTP Headers, did you add Content-Type = application/json ?
answered
Joost Verhoog
1
7.11 does not warn you about this. 7.12 went into oblivion. 7.13 does report this error.
answered
𝕿𝖎𝖒 𝖛𝖆𝖓 𝕾𝖙𝖊𝖊𝖓𝖇𝖊𝖗𝖌𝖊𝖓
0
Hi Joost,
No I had not in either the GET or POST, and yet the GET worked.
When I add them,
I get 4 "Error(s) in microflow expression" syntax errors (one for each of the custom HTTP header value/pairs.