java - Put many request parameters with GET request in REST API -
is practice put many request parameters request in rest api?
i have gone through couple of sites , tried standard way of doing get uri
parameters implementation.
here's trying achieve : search users having provided search criteria
.
search criteria companyid
, sections
, offset
, limit
, orderby
, filter
.
as per basic standards get
request can not have request body or payload
in it.
will way make get
request , put parameters behind ?
in request url, :
get http://localhost:8080/api/users?companyid=qwerty§ions=hr&offset=0&limit=20&oorderby=asc&filter=^[ssmm]
i thinking make put
or post
request , send these data in payload, , implement code return desired response, i.e list of users.
if changing default behavior of http methods
.
can please guide me way out of situation. thanks.
i think not matter how many parameters put in get
request. purpose of post
or put
request not keep url clean, aline rest structure.
the raw definition of get, post , put are
get
: resource serverpost
: create resource on serverput
: update resource on server
Comments
Post a Comment