Page 1 of 1

Rest Json syntax

Posted: Thu Sep 26, 2019 3:32 pm
by Alisa Backert
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:

Code: Select all

{
  "credentials": {
    "1": "sample string 2",
    "3": "sample string 4"
  },
  "election": "aded1ff2-2943-4b7d-a868-7081c8fc98fa",
  "phase": "sample string 2"
}
https://imgur.com/a/Xbtt082

Example regular POST
https://imgur.com/a/PHqmisT

Re: Rest Json syntax

Posted: Fri Oct 04, 2019 6:44 am
by support
Hi Alisa,

Thank you for your patience- we've tried looking into your account for associated logs and testing things ourselves to recreate the issue but have been unsuccessful so far. Everything appears to be working as expected - can you kindly elaborate on what you mean by unsuccessful?

Thank you,
Plum Support

Re: Rest Json syntax

Posted: Fri Oct 04, 2019 4:37 pm
by Alisa Backert
Hi,

Sorry for the delay in responding. We figured it out. We just needed to set the header value to "Content-Type: application/json" and that resolved the issue.