Drupal 9: "PATCH" request to REST API fails with "No entity content received"

raw

1-README.rst

The reason for my problem was that I had two slashes at the beginning:

PATCH //node/3230?_format=json HTTP/1.1

After removing one, it worked.

The double slashes were redirected to a single slash, but the body was lost in the redirection.

raw

2-request.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
        "type": [
                {
                        "target_id": "event",
                        "target_type": "node_type"
                }
        ],
        
        "title": [
                {
                        "value": "20. Arbeitstreffen!!"
                }
        ]
}
raw

3-response.json

1
2
3
{
        "message": "No entity content received."
}
Christian Weiske Christian Weiske
owner

History