Publishing REST service to accept x-www-form-urlencoded

Hi, I am working on integrating Slack into an app and the Slash Command feature in Slack makes a post to my app with parameters in the body that are x-www-form-urlencoded.  I cannot seem to get these parameters cleanly parsed into my app.  Has anyone else had success with this?  I can see the entire body with all of the parameters but it would be tedious to parse through that string to look for the = and the & etc.  Is there a native way to extract these parameters from the content body? 
4 answers

Not to my knowledge.

Since 7.12 it says “Custom handlers can now access the body of application/x-www-form-urlencoded requests. (Ticket 61729)”. Nothing more than that and no help to you since you can see the entire body already. So likely your stuck with building the parsing yourself.

Maybe this also helps:



You have access to the body when your microflow takes a System.HttpRequest parameter. The microflow would need to parse the body.


Hi Johnathan,

Is this the api that you are using?


if so, it looks like you will get a response that looks similar to this 



and you are looking for an easy way to parse this. 


I dont think there is a native way to do this but the community commons module has a string split java action. You can use that to split on the ‘&’ and the ‘=’ (like you mentioned above).

The microflow would look similar to this

Once you get the parameter values, you can use the urlDecode string function.


Hope this helps!



you should do this