Also,
- Where did hashes go?
- Would you use querystring inside POST, PUT, and PATCH?
- What about OPTIONS? Can it read querystring and body?
Also,
For further actions, you may consider blocking this person and/or reporting abuse
Md Shahriar -
Angelina Jasper -
keploy -
Mads Stoumann -
Top comments (1)
From RFC 7230 Section 2.7
Specifically about the components, we can read RFC 3986
Path
Query
So I'd say in an API, path params are for hierarchical parameters, such an
id
parameter underuser
, while query parameters are for non-hierarchical parameters, such as search filters.About body (RFC 7231 Section 4.3.1):
Fragment (Hash) from RFC 3986 Section 4.2
RFC 7231 Section 9.5
There is nothing against using query in POST, PUT, and PATCH. However, PUT and PATCH are explicitly defined in terms of a body payload:
OPTIONS from RFC 7231 Section 4.3.7
It can read query and body, but there is no standard on the semantics.