Rest Json syntax
Posted: Thu Sep 26, 2019 3:32 pm
We're attempting to use our RESTful web service which accepts a JSON object for the body parameters. One of the parameters requires an array.
We've successfully used the REST module with a request type POST with single variables, but have been unsuccessful when using an array.
Alternately, we attempted using the REST module with the request type POST RAW but have been unsuccessful even with a single variable.
Example of POST RAW:
https://imgur.com/a/Xbtt082
Example regular POST
https://imgur.com/a/PHqmisT
We've successfully used the REST module with a request type POST with single variables, but have been unsuccessful when using an array.
Alternately, we attempted using the REST module with the request type POST RAW but have been unsuccessful even with a single variable.
Example of POST RAW:
Code: Select all
{
"credentials": {
"1": "sample string 2",
"3": "sample string 4"
},
"election": "aded1ff2-2943-4b7d-a868-7081c8fc98fa",
"phase": "sample string 2"
}
Example regular POST
https://imgur.com/a/PHqmisT