webhook does not permit the json type in template - body of post

Anonymous
Not applicable
when i use webhook and i try to define the type json for the body of the psot request - it will send type
"application/x-www-form-urlencoded" in any case.

Any ideas why?
thanks
Tags (1)
8 REPLIES 8
Anonymous
Not applicable
Richard,
We will fix the webhook infrastructure to treat all 2xx responses as success in a near future release.

Raj
Anonymous
Not applicable
Thank you Raj!  I never would have found that; I was looking in the "Edit webhook" dialog.

Now working.  Incidentally, the third party I am using returns status code 201 ("CREATED") which is perfectly legitimate.  Marketo sees this as an error.  It probably shouldn't.  Anyway, the data get across so I can now start to see what I can make with this!

0EM50000000RApG.jpg
Anonymous
Not applicable
Richard,
You can set the content-type header to application/json

0EM50000000R9vn.jpg0EM50000000R9vs.jpg
Anonymous
Not applicable
@Raj  Thanks for the responses.  May I check on the status of this?  For my POST webhooks Marketo always seems to set the content-type header to "application/x-www-form-urlencoded", even when posting json.

But third party site requires it to be set to "application/json" when POSTing json.
 
I don't see any way to set custom headers. Changing "Response type" doesn't seem to do it.
 
Anonymous
Not applicable
not quite - token encoding is handled properly, but mime-type is not set to match the request template.  
Anonymous
Not applicable
Thanks for the reply.
So to be sure - what you are saying is that the "Request Token Encoding" does not work?
Thanks, Michal
Anonymous
Not applicable
Amnon,
We plan to allow custom headers in the June release and this will enable you to change the mime-type

Raj
Anonymous
Not applicable
Hi Amnon,
webhooks currently does not support changing the request headers. All webhooks call-outs are done as form POST

The Drop down that you are using is for response parsing. i.e. parse the response as JSON/XML and then use it to map values to lead fields.

regards