Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3637

REST API Best practices: args in query string vs in request body

$
0
0

A REST API can have arguments in several places:

  1. In the request body - As part of a JSON body, or other MIME type
  2. In the query string - e.g., /api/resource?p1=v1&p2=v2
  3. As part of the URL path - e.g., /api/resource/v1/v2

What are the best practices and considerations of choosing between 1 and 2 above?

2 vs 3 is covered here.


Viewing all articles
Browse latest Browse all 3637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>