Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test sending an Array as request body #18

Open
brunierterry opened this issue Nov 21, 2018 · 0 comments
Open

Test sending an Array as request body #18

brunierterry opened this issue Nov 21, 2018 · 0 comments

Comments

@brunierterry
Copy link
Contributor

Hi @shunjikonishi
Is there a way to test an endpoint, with api-first-spec, by sending a POST query which body is an Array ?

as valid JSON object for ?
Such array of objects without any key appears to be valid JSON and is used by some services like SendGrid Webhook events :

[
   {
      "email":"[email protected]",
      "timestamp":1513299569,
      "smtp-id":"<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "event":"processed",
      "category":"cat facts",
      "sg_event_id":"sg_event_id",
      "sg_message_id":"sg_message_id"
   },
   {
      "email":"[email protected]",
      "timestamp":1513299569,
      "smtp-id":"<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "event":"deferred",
      "category":"cat facts",
      "sg_event_id":"sg_event_id",
      "sg_message_id":"sg_message_id",
      "response":"400 try again later",
      "attempt":"5"
   }
]

(Example extracted from Sendgrid Webhook documentation - Events)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant