Response body is optional and can be returned.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- api, documentation
Direzione di ricerca
Inizia dalla sezione 13.2.1, «PUT», delle linee guida API e confronta i relativi esempi di 202 Accepted e 201 Created con RFC 7231. Chiarisci che il corpo di una risposta 202 è facoltativo e spiega cosa devono aspettarsi i client quando ne viene incluso uno; il testo aggiornato delle linee guida è il criterio di completamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
**_13.2.1. PUT
Services MAY enable PUT requests for entity creation.
PUT https://api.contoso.com/v1.0/databases/db1
In this scenario the databases segment is processing the PUT operation.
HTTP/1.1 202 Accepted
Operation-Location: https://api.contoso.com/v1.0/operations/123
For services that need to return a 201 Created here, use the hybrid flow described below.
The 202 Accepted should return no body. The 201 Created case should return the body of the target resource._**
Please find additional notes that body is optional:
According to the HTTP/1.1 specification (RFC 7231), the 202 Accepted status code is optional when it comes to including a response body. The decision to include a response body depends on the specific use case and the API design.
When you choose to include a response body with a 202 Accepted response, it is typically used to provide additional information about the ongoing process or to give details on how to track the progress of the operation. This might include a status message or a reference to a resource that provides the current status of the operation.
If you decide to include a response body, it is important to ensure that the response is properly documented in your API documentation so that clients know what to expect and how to handle the response.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 23.3k
- Fork
- 2.7k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/api-guidelines
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
microsoft/api-guidelines#571 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 5/100
microsoft/api-guidelines#570 ·
-
Im Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
microsoft/api-guidelines#562 ·
-
Continue with the team Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
microsoft/api-guidelines#560 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 58/100
microsoft/api-guidelines#559 ·
Tutte le issue di microsoft/api-guidelines
Issue simili
-
area/sessions comp/agent P2 tool/skills type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#117788 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
code-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/gh-aw-firewall#8816 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getgrav/grav-plugin-api#45 ·