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&sections=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 server
  • post: create resource on server
  • put: update resource on server

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -