Skip to content

How do I reuse a set of parameters between POST and PATCH request? #3300

Closed Answered by hkosova
KieranP asked this question in Q&A
Discussion options

You must be logged in to vote

Just to clarify - are these parameters query parameters, or are they request body fields?

I'm asking because your example looks like CRUD, and the typical CRUD design is

POST /users

{
  "field1": value1,
  ...
}
PATCH /users/:id

{
  "field1": value1,
  ...
}

rather than POST /users?field1=value1&....

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@KieranP
Comment options

Answer selected by KieranP
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
param serialization Issues related to parameter and/or header serialization
3 participants