U
U
Urukhayy2017-11-19 12:18:44
Web development
Urukhayy, 2017-11-19 12:18:44

What is the semantically correct way to use a PUT request to update a record?

For example, there is a large document, on the server, in JSON format, which needs to be updated via the API. And you only need to update 1 parameter.
How to compose the body of a PUT request?

{
    key: "name",
    value: "A new name"
}

Or
{
    name: "A new name"
}

Or somehow else?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question