3

I am having this simple POST url to which my clients will send a POST request.

http://mydomain.com/requests/request

POST Data:

<Request>
<OrderId>1E008921</OrderId>
<OrderName>MC1</OrderName>
</Request>

to which I respond by sending back them a XML

<SRequest>
<RequestedBy>Client 1 </RequestedBy>
<RequestName>Test Name</RequestName>
<RequestStatus>Success</RequestStatus>
<SRequest>

Now client wants the above XML in a different language (say French)

How to handle this ? How to send the response language preference in Web API ? specially with the POST scenario like this ? (Append a language string ? or what is the best practices ?)

1

1 Answer 1

2

I suggest you either include it in URL: http://mydomain.com/fr/requests/request or use HTTP header like Accept-Language. You could read more in the answer to: Good way to changing language resources dynamically by request

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.