Saturday 15 March 2014

json - Should requests and responses to web services be encoded the same? -



json - Should requests and responses to web services be encoded the same? -

for illustration if send request x-www-form-urlencoded considered bad practice send json web service? should sending request json if sending json back?

technically speaking, not matter, since server , client can negotiate media types. if both client , server can handle media types, it's fine.

however, of times same mime type used both requests , responses because it's easier developers reason web service's api , might easier implement since have 1 type of representation handle. utilize whatever makes sense , pertinent utilize case having.

json web-services http

No comments:

Post a Comment