Http Cookies/Headers and Esri Mapping

639
3
02-11-2013 05:00 AM
JeremyLezniak
New Contributor
I'm wondering if someone can point me in the best practices direction of adding custom http headers to out going Android tile requests.  I have a tile service I've coded that has some authentication information and session information that is needed to be stored in a cookie or custom http header.  This cookie metadata is needed to fulfill tile requests to our Esri Api-compliant tile service.  What is the accepted and best practice method for doing this?

Thank you in advance...
0 Kudos
3 Replies
JeremyLezniak
New Contributor
I'm still stuck on this.  Searching the mobile docs, I see no mention of a cookie store/manager, etc like org.apache.http.client.CookieStore provides.  Has anyone ever added a cookie to an outgoing http request that the Esri Android sdk would be making for a tile request (to an Esri mapping service)?
0 Kudos
DanO_Neill
Occasional Contributor III
Our Android SDK does not provide support for custom HTTP headers, instead you should look into the Android API to solve this.  You can try the Apache stack with AbstractHttpMessage or URLConnection. Let me know if you continue to have issues.
0 Kudos
JeremyLezniak
New Contributor
Our Android SDK does not provide support for custom HTTP headers, instead you should look into the Android API to solve this.  You can try the Apache stack with AbstractHttpMessage or URLConnection. Let me know if you continue to have issues.


Thank you for you reply, but your answer is still not 100% clear to me.  Could you show by a small example how tie into the MapView's network stack (I'm not even 100% sure MapView has a nework manager for outgoing requests, I'm just guessing).  I understand using Apache's http framework in accessing requests/responses when creating my own http request, but such an implementation is not obvious to me with Esri's android sdk (or how to tie them together with your suggestion).  Is it a matter of reflection/introspection to gain access to a seemingly hidden network manager that tile requests are happening through?

I apologize if my request is simple and it should be obvious to me, but I do need a little more help solving this.
0 Kudos