Skip to content

Commit f8241ee

Browse files
committed
Fixed PersistentCookiSample to allow redirects (httpbin redirects circulary on /cookie) and added into Manifest to be runnable
1 parent 67bd227 commit f8241ee

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<activity android:name=".RetryRequestSample"/>
3838
<activity android:name=".RangeResponseSample"/>
3939
<activity android:name=".Http401AuthSample"/>
40+
<activity android:name=".PersistentCookiesSample"/>
4041

4142
<service android:name=".services.ExampleIntentService"/>
4243
</application>

sample/src/main/java/com/loopj/android/http/sample/PersistentCookiesSample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ protected SampleJSON parseResponse(String rawJsonData, boolean isFailure) throws
115115

116116
@Override
117117
public RequestHandle executeSample(AsyncHttpClient client, String URL, Header[] headers, HttpEntity entity, ResponseHandlerInterface responseHandler) {
118+
client.setEnableRedirects(true);
118119
return client.get(this, URL, headers, null, responseHandler);
119120
}
120121

0 commit comments

Comments
 (0)