com.stackmob.sdk.net
Class HttpRedirectHelper
java.lang.Object
com.stackmob.sdk.net.HttpRedirectHelper
public class HttpRedirectHelper
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedirectStatusCode
public static final int RedirectStatusCode
- See Also:
- Constant Field Values
HttpRedirectHelper
public HttpRedirectHelper()
getNewLocation
public static String getNewLocation(Map<String,String> headers)
throws Exception
- get the new request that represents the redirect if there is one
- Parameters:
headers - the headers from which to get the new loc
- Returns:
- the new request to make. NOTE: if a redirect happened, setURI will be called on oldRequest and the result is returned, so your original request will be modified in place.
- Throws:
Exception - if there was a problem getting the redirect location
URISyntaxException - if there is a problem parsing the redirect URL
isRedirected
public static boolean isRedirected(int responseCode)
Copyright © 2011 StackMob. All Rights Reserved.