0

I am trying to set up a Python API through flask. Is it better to put parameter in route, for example: HTTP GET IP_ADDRESS/users/string:user_name

or to put the parameter within the request json, for example: HTTP GET IP_ADDRESS/users body: {'user_name':<user_name>}

I usually use the latter option, but the tutorials I have seen on flask all uses the former.

I disagree with the duplicate tag as I do not think it answers my question.

Samson
  • 1,336
  • 2
  • 13
  • 28
  • this will tell you when to pass parameter in request body or request param , choice is your how you goona send, both way are good – sahasrara62 Dec 15 '20 at 12:24
  • @sahasrara62 No it does not? Where does it tell me when to pass parameter in request body or request param? – Samson Dec 16 '20 at 03:29

0 Answers0