You need to sign in to do that
Don't have an account?
subaa
Need the sample code to set request body for POST method
Hi,
Can anyone send me the reference document or sample code (in Java) to set request body values for a POST method?
It would be grateful if you send me the code fro this sample data.
{
"body" : {
"messageSegments" : [
{
"type": "mention",
"id" : "005D0000001GpHp"
},
{
"type": "text",
"text" : " Did you see the new plans?"
}
]
}
}
Regards,
SuBaa
Here is an example in Ruby. A post is effectively a HTTP POST. The trick is setting up the json response correctly (see the snippet below):