Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Web API URL Routing

$
0
0

We are looking at developing a set of API End Points that need to be Culturally aware.  Our Localization will mostly be done via the data stores for example, take cultural info.  We maintain the culture code en-US in a table, but in a separate table, we maintain the display name translated to different languages or dialects of a language.  For example, if I have a user who speaks Deutsch (the primary language of Germany), the cultural name for the en-US would be display as"Englisch - Vereinigte Staaten"; if the person spoke English, it would display as English - United States.  

To make the APIs culturally aware, we would like to include the culture code in the URL and so far, looking at current routing standards, I see that the suggested practice is "domain.com/api/controller/{culture code}/{id}".  However, is there a way to inspect the URL upon the incoming request so that we can get the culture info before running the controller, so we can setup the URL as "domain.com/api/{culture code}/controller/{id}"?

I see this is done with versioning, so could anyone point me to any info on how to inspect a URL prior to running the controller?


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

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