13

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

1
  • Is this hosted globally? anyway we can test this from our local machines? Commented Mar 24, 2017 at 18:13

1 Answer 1

16

Select

METHOD POST

Then under Body chose raw

here is a screenshot

enter image description hereon/json

Sign up to request clarification or add additional context in comments.

4 Comments

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={}
@MauricioJunior Can you show us what you had in your postman?
@Coder Ive added the photo in the body
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."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.