rest - Does the locale belong on the path or as a request parameter on the URI? -


i have seen locale added uri path variable:

/en-us/blah/ 

or

/blah/en-us 

and have seen request parameter:

/blah?lang=en-us 

is there standard way should doing it? if not pros , cons of each approach?

i kind of request parameter approach because doesn't require pass locale every uri (unless use second approach , add locale end of path). additional thoughts?

i believe "standard way" use http "accept language" header. other that, if think ought parameter (because it's system-system call or might request language other browser locale) it's parameter same else , should handle in similar fashion.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -