9

I am using JSONAPI Specification http://jsonapi.org/format/#status

And I have data like below,

{
  "data": 
    {
    "type": "tag",
    "id": "1",
    "attributes": {
        "name": "Test"
    }
  }
}

How do I make a post request to the end point using postman chrome extension ?

I am trying to make a call but I cannot get the params.

Obs. I already set my Content-Type as application/vnd.api+json

Thanks !

valid HTML

Coder
  • 1,842
  • 1
  • 13
  • 18
Mauricio Junior
  • 95
  • 1
  • 2
  • 4

1 Answers1

11

Select

METHOD POST

Then under Body chose raw

here is a screenshot

enter image description hereon/json

Confidence
  • 2,163
  • 2
  • 31
  • 55
  • Thanks for the quick answer, but unfortunately Im getting this erro JSONAPI::Parser::InvalidDocument: A JSON object MUST be at the root of every JSONAPI request and response containing data. Also, the params and raw are coming as empty @raw={}, @params={} – Mauricio Junior Mar 24 '17 at 14:43
  • @MauricioJunior Can you show us what you had in your postman? – Coder Mar 24 '17 at 15:21
  • @Coder Ive added the photo in the body – Mauricio Junior Mar 24 '17 at 16:20
  • 2
    I know it's a little late, but depending on the server implementation, you have to set the header "Content-type" to "application/vnd.api+json." – dvtelles Apr 20 '18 at 15:15