How to handle HTTP redirect with HTTP connection

2 posts / 0 new
Last post
ezyclie
ezyclie's picture
Offline
Mobile Wizard
Joined: 4 Mar 2010
Posts:
How to handle HTTP redirect with HTTP connection

Hi guys,

Is there any way to handle HTTP redirect (301) with MoSync HTTP connection API ? Is this issue being resolved?

Thanks in advance

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

When you get a 301 response, you should be able to read the "location" header using HttpConnection::getResponseHeader() or maHttpGetResponseHeader(). You can then create a new connection to that location.

Handling redirects automatically is outside the scope of the current API. It would be possible to write a new class on top of the existing HttpConnection.