Integration Builder detects URL encoded content-type as JSON

Problem

When creating an HTTP request with a URL encoded content-type, xMatters sets it as JSON.

Environment

All versions of xMatters 

Resolution 

The Integration Builder automatically sets the content to the relevant type. You can override this by converting the content to a string (using back ticks), for example:

 body = `[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": input['workItemTitle']
},
{
"op": "add",
"path": "/fields/System.Description",
"from": null,
"value": input['workItemDescription']
}
]`
;

Cause

If the Integration Builder detects the content provided as JSON, it sets the content type as JSON by default.


Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.