3

How are you my friends ?

i have an issue with API with drupal 8 in post method

when i send the request the respond is 406 Not Acceptable

this is the code

POST /movies/entity/node?_format=hal_json HTTP/1.1
Host: abdallah.tech
X-CSRF-Token: t1UOL3VNN0GRGSNxWN************************
Authorization: Basic ************************
Cache-Control: no-cache
Postman-Token: 4f61c400-4916-4dfb-8ca7-0ed08c48a4bc

    {
  "_links": {
    "type": {
      "href": "http://abdallah.tech:8083/movies/rest/node/add/movies"
    }
  },
  "type": [{
      "target_id": "movies"
    }],
  "title": [{
      "value": "hello world"
    }],
  "body": [{
      "value": "some body content aaa bbb ccc"
  }]

}'

can you help me with that please

1 Answer 1

2

just try to change

POST /movies/entity/node?_format=hal_json HTTP/1.1

to

POST /movies/node?_format=hal_json
// or
POST /node?_format=hal_json
Sign up to request clarification or add additional context in comments.

Comments

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.