codeforamerica / open311_java

Java language binding (wrapper) to the Open311 REST API
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

Accept-language #13

Open milovanderlinden opened 8 years ago

milovanderlinden commented 8 years ago

I need the Accept-language set in the POST and GET as the texts returned by the open311 endpoint depends on the language in our case.

For now I have created a small hack, but it is Android specific as it tries to detect the system locale.

httpGet.setHeader(ACCEPT_LANGUAGE, Locale.getDefault().toString());
SantiMunin commented 8 years ago

IIUC, you'd need basically the same but without Android specific code. Is that correct?

milovanderlinden commented 8 years ago

Exactly.

SantiMunin commented 8 years ago

I will look into this next week.

SantiMunin commented 8 years ago

Milo,

would it be possible to get the endpoint you are using to make some basic manual tests to check the change works?

Thanks