Open xiaomeixw opened 9 years ago
Can you give us more detail please? Is it POST, GET etc and what is the size of data being sent/received or any more information that we can recreate the issue thanks
I just want "https://api.github.com/" this url's json string, I use GET ,but no params...but in log the return body like this:���������������Mn�0��¢�(�G�r���&�ЈZܽ3H%�l�,�7���qY1����.Y��ۋ�W�Ja=�΅n�i/��ڨ�Jw6��m^�lX@T]eE�� /�$}��Y�D�(6�ʉ2��۳lS��[����e�y�zw��8��^Vp�'���Oڔ`��R56��%f�+�(f��o�A����e����i�&���u������J٘/�8��i}��������<&�l��Ff��|�i��.cDw�Ǻ��;���T�[�'7�k��� "�If���Ix����Ӷ�[Y�.G�aI�7��<u�b�Ih$BިVћzN����Lj�9_���% �2�q#?p�ۆ����L��ߗ�,ݚ�2�k!��[�|pn�"yp���� �f�W>�ς� ���&F6����j��z͜�r����0���L��/S�^����
in WaspApplication:
service = new Wasp.Builder(this)
.setEndpoint("https://api.github.com")
.setLogLevel(LogLevel.FULL)
.setWaspHttpStack(new WaspOkHttpStack(okHttpClient))
.setNetworkMode(NetworkMode.MOCK)
.build()
.create(MyService.class);
in MyService:
@GET("")
WaspRequest postCityWeather(
Callback<String> callback
);
in my WeatherActivity.class
getService().postCityWeather(new Callback<String>() {
@Override
public void onSuccess(Response response, String s) {
tv1.setText(response.getBody().getBytes().toString().trim());
tv.setText(s);
}
@Override
public void onError(WaspError error) {
Toast.makeText(WeatherActivity.this, error.getErrorMessage(), 1).show();
}
});
let's my log:
08-22 22:06:24.845 3738-3738/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_launch_request id:com.orhanobut.waspsample time:16881751 08-22 22:06:24.925 3738-3738/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com 08-22 22:06:24.925 3738-3738/com.orhanobut.waspsample D/Wasp﹕ Body - no body 08-22 22:06:24.925 3738-3738/com.orhanobut.waspsample D/Wasp﹕ ---> END 08-22 22:06:25.035 3738-3738/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activityidle id: android.os.BinderProxy@423def38 time:16881948 08-22 22:06:25.955 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;) 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;) 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to resolve static method 17750: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream; 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;) 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;) 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample W/dalvikvm﹕ VFY: unable to resolve static method 17749: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream; 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Accept-Encoding: gzip] 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Connection: Keep-Alive] 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Host: api.github.com] 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [User-Agent: okhttp/2.2.0] 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Body - no body 08-22 22:06:25.965 3738-3752/com.orhanobut.waspsample D/Wasp﹕ ---> END 08-22 22:06:26.745 3738-3752/com.orhanobut.waspsample D/Wasp﹕ <--- RESPONSE 200 https://api.github.com 08-22 22:06:26.755 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Allow-Credentials: true] 08-22 22:06:26.755 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Allow-Origin: ] 08-22 22:06:26.755 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval] 08-22 22:06:26.755 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Cache-Control: public, max-age=60, s-maxage=60] 08-22 22:06:26.755 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Encoding: gzip] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Security-Policy: default-src 'none'] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Type: application/json; charset=utf-8] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Date: Sat, 22 Aug 2015 14:06:25 GMT] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [ETag: W/"8d6b77b29ac0c36bfcba958714ac1fe8"] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Received-Millis: 1440252386751] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Selected-Protocol: http/1.1] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Sent-Millis: 1440252385972] 08-22 22:06:26.765 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Server: GitHub.com] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Status: 200 OK] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Strict-Transport-Security: max-age=31536000; includeSubdomains; preload] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Transfer-Encoding: chunked] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Vary: Accept] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [Vary: Accept-Encoding] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Content-Type-Options: nosniff] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Frame-Options: deny] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-GitHub-Media-Type: github.v3; format=json] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-GitHub-Request-Id: B78369A7:3D49:16EB6D59:55D881E1] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Limit: 60] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Remaining: 48] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Reset: 1440252427] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Served-By: 318e55760cf7cdb40e61175a4d36cd32] 08-22 22:06:26.775 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Header - [X-XSS-Protection: 1; mode=block] 08-22 22:06:28.995 3738-3752/com.orhanobut.waspsample D/Wasp﹕ Body - ���������������Mn�0��¢�(�G�r���&�ЈZܽ3H%�l�,�7���qY1����.Y��ۋ�W�Ja=�΅n�i/��ڨ�Jw6��m^�lX@T]eE�� /�$}��Y�D�(6�ʉ2��۳lS��[����e�y�zw��8��^Vp�'���Oڔ`��R56��%f�+�(f��o�A����e����i�&���u������J٘/�8��i}��������<&�l��Ff��|�i��.cDw�Ǻ��;���T�[�'7�k��� "�If���Ix����Ӷ�[Y�.G�aI�7��<u�b�Ih$BިVћzN����Lj�9*���% �2�q#?p�ۆ����L��ߗ�,ݚ�2�k!��[�|pn�"yp���� �f�W>�ς� ���&F6����j��z͜�r����0���L��/S�^���� 08-22 22:06:28.995 3738-3752/com.orhanobut.waspsample D/Wasp﹕ <--- END (Size: -1 bytes - Network time: 781.497083 ms) 08-22 22:06:28.995 3738-3752/com.orhanobut.waspsample D/WaspSample﹕ Network time: 3027.638333 ms 08-22 22:06:29.015 3738-3752/com.orhanobut.waspsample E/Volley﹕ [2932] NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException: closed java.lang.IllegalStateException: closed at okio.RealBufferedSource.read(RealBufferedSource.java:47) at okio.RealBufferedSource.request(RealBufferedSource.java:71) at okio.RealBufferedSource.require(RealBufferedSource.java:64) at okio.GzipSource.consumeHeader(GzipSource.java:114) at okio.GzipSource.read(GzipSource.java:73) at okio.RealBufferedSource$1.read(RealBufferedSource.java:349) at java.io.InputStream.read(InputStream.java:162) at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:253) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:129) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112) 08-22 22:06:29.015 3738-3738/com.orhanobut.waspsample D/Wasp﹕ <--- ERROR 08-22 22:06:29.025 3738-3738/com.orhanobut.waspsample D/Wasp﹕ Message - [java.lang.IllegalStateException: closed] 08-22 22:06:29.025 3738-3738/com.orhanobut.waspsample D/Wasp﹕ <--- RESPONSE 0 https://api.github.com 08-22 22:06:29.025 3738-3738/com.orhanobut.waspsample D/Wasp﹕ Body - no body 08-22 22:06:29.025 3738-3738/com.orhanobut.waspsample D/Wasp﹕ <--- END (Size: 0 bytes - Network time: 11763 ms) 08-22 22:06:29.035 3738-3738/com.orhanobut.waspsample W/Toast﹕ From com.orhanobut.waspsample, go ahead. 08-22 22:06:29.035 3738-3738/com.orhanobut.waspsample D/Volley﹕ [1] Request.finish: 4065 ms: [ ] https://api.github.com 0x4da20d4a NORMAL 1
You need to provide custom type to wasp in order to parse it, in your case callback should have something like below.
class GithubApi {
// fields
}
@GET("/")
WaspRequest postCityWeather(
Callback<GithubApi> callback
);
I follow your suggest,I add GitHubBean.class and use it , but in the end no effective...
public class GitHubBean {
public String current_user_url;
public String current_user_authorizations_html_url;
public String authorizations_url;
public String code_search_url;
public String emails_url;
public String emojis_url;
public String events_url;
public String feeds_url;
public String following_url;
public String gists_url;
public String hub_url;
public String issue_search_url;
public String issues_url;
public String keys_url;
public String notifications_url;
public String organization_repositories_url;
public String organization_url;
public String public_gists_url;
public String rate_limit_url;
public String repository_url;
public String repository_search_url;
public String current_user_repositories_url;
public String starred_url;
public String team_url;
public String user_url;
public String user_organizations_url;
public String user_repositories_url;
public String user_search_url;
@Override
public String toString() {
return "GitHubBean{" +
"current_user_url='" + current_user_url + '\'' +
", current_user_authorizations_html_url='" + current_user_authorizations_html_url + '\'' +
", authorizations_url='" + authorizations_url + '\'' +
", code_search_url='" + code_search_url + '\'' +
", emails_url='" + emails_url + '\'' +
", emojis_url='" + emojis_url + '\'' +
", events_url='" + events_url + '\'' +
", feeds_url='" + feeds_url + '\'' +
", following_url='" + following_url + '\'' +
", gists_url='" + gists_url + '\'' +
", hub_url='" + hub_url + '\'' +
", issue_search_url='" + issue_search_url + '\'' +
", issues_url='" + issues_url + '\'' +
", keys_url='" + keys_url + '\'' +
", notifications_url='" + notifications_url + '\'' +
", organization_repositories_url='" + organization_repositories_url + '\'' +
", organization_url='" + organization_url + '\'' +
", public_gists_url='" + public_gists_url + '\'' +
", rate_limit_url='" + rate_limit_url + '\'' +
", repository_url='" + repository_url + '\'' +
", repository_search_url='" + repository_search_url + '\'' +
", current_user_repositories_url='" + current_user_repositories_url + '\'' +
", starred_url='" + starred_url + '\'' +
", team_url='" + team_url + '\'' +
", user_url='" + user_url + '\'' +
", user_organizations_url='" + user_organizations_url + '\'' +
", user_repositories_url='" + user_repositories_url + '\'' +
", user_search_url='" + user_search_url + '\'' +
'}';
}
}
and in MyService:
@GET("/")
WaspRequest postCityWeather(
Callback<GitHubBean> callback
);
That's the first time log:(no body return)
08-22 23:28:04.489 29471-29471/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@425ff198 time:21732694
08-22 23:28:06.809 29471-29471/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_launch_request id:com.orhanobut.waspsample time:21735013
08-22 23:28:06.879 29471-29471/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com/
08-22 23:28:06.879 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:28:06.879 29471-29471/com.orhanobut.waspsample D/Wasp﹕ ---> END
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com/
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ Header - [Accept-Encoding: gzip]
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ Header - [Connection: Keep-Alive]
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ Header - [Host: api.github.com]
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ Header - [User-Agent: okhttp/2.2.0]
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:28:06.889 29471-29493/com.orhanobut.waspsample D/Wasp﹕ ---> END
08-22 23:28:06.999 29471-29471/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@42615330 time:21735200
08-22 23:28:10.849 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- ERROR
08-22 23:28:10.849 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Message - [null]
08-22 23:28:10.849 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- RESPONSE 0 https://api.github.com/
08-22 23:28:10.849 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:28:10.849 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- END (Size: 0 bytes - Network time: 297012 ms)
08-22 23:28:10.869 29471-29471/com.orhanobut.waspsample W/Toast﹕ From com.orhanobut.waspsample, go ahead.
08-22 23:28:10.889 29471-29471/com.orhanobut.waspsample D/Volley﹕ [1] Request.finish: 3995 ms: [ ] https://api.github.com/ 0x4da20d4a NORMAL 9
then i close the app , restart the app , the log like this:(it happen again)
08-22 23:29:04.819 29471-29471/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_launch_request id:com.orhanobut.waspsample time:21793027
08-22 23:29:04.899 29471-29471/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com/
08-22 23:29:04.899 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:29:04.899 29471-29471/com.orhanobut.waspsample D/Wasp﹕ ---> END
08-22 23:29:05.029 29471-29471/com.orhanobut.waspsample I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@4264d8c8 time:21793234
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ ---> REQUEST GET https://api.github.com/
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Accept-Encoding: gzip]
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Connection: Keep-Alive]
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Host: api.github.com]
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [User-Agent: okhttp/2.2.0]
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:29:06.319 29471-29492/com.orhanobut.waspsample D/Wasp﹕ ---> END
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ <--- RESPONSE 200 https://api.github.com/
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Allow-Credentials: true]
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Allow-Origin: *]
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval]
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Cache-Control: public, max-age=60, s-maxage=60]
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Encoding: gzip]
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Security-Policy: default-src 'none']
08-22 23:29:06.699 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Content-Type: application/json; charset=utf-8]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Date: Sat, 22 Aug 2015 15:29:06 GMT]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [ETag: W/"8d6b77b29ac0c36bfcba958714ac1fe8"]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Received-Millis: 1440257346708]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Selected-Protocol: http/1.1]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [OkHttp-Sent-Millis: 1440257346331]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Server: GitHub.com]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Status: 200 OK]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Strict-Transport-Security: max-age=31536000; includeSubdomains; preload]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Transfer-Encoding: chunked]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Vary: Accept]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [Vary: Accept-Encoding]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Content-Type-Options: nosniff]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Frame-Options: deny]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-GitHub-Media-Type: github.v3; format=json]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-GitHub-Request-Id: 76BB1531:7C7B:11A1D670:55D89541]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Limit: 60]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Remaining: 59]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-RateLimit-Reset: 1440260946]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-Served-By: 8a5c38021a5cd7cef7b8f49a296fee40]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Header - [X-XSS-Protection: 1; mode=block]
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ Body - ���������������Mn�0��¢�(�G�r���&�ЈZܽ3H%�l�,�7���qY1����.Y��ۋ�W�Ja=�΅n�i/��ڨ�Jw6��m^�lX@T]eE��
/�$}��Y�D�(6�ʉ2��۳lS��[����e�y*�zw��8��^Vp�'���Oڔ`��R56��%f�+�(f��o�A����e����i�&���u������J٘/�8�_�i}��������<&�l��Ff��|�i��.cDw�Ǻ��;���T�[�'7�k��� "�If���Ix����Ӷ�[Y�.G�aI�7��<u�b�Ih$BިVћzN����Lj�9*���%
�2�q#?p�ۆ����L��ߗ�,ݚ�2�k!��[�|pn�"yp����
�f�W>�ς� ���&F6����j��z͜�r����0���L��/S�^����
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/Wasp﹕ <--- END (Size: -1 bytes - Network time: 377.606771 ms)
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample D/WaspSample﹕ Network time: 394.482447 ms
08-22 23:29:06.709 29471-29492/com.orhanobut.waspsample E/Volley﹕ [3181] NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException: closed
java.lang.IllegalStateException: closed
at okio.RealBufferedSource.read(RealBufferedSource.java:47)
at okio.RealBufferedSource.request(RealBufferedSource.java:71)
at okio.RealBufferedSource.require(RealBufferedSource.java:64)
at okio.GzipSource.consumeHeader(GzipSource.java:114)
at okio.GzipSource.read(GzipSource.java:73)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:349)
at java.io.InputStream.read(InputStream.java:162)
at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:253)
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:129)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)
08-22 23:29:06.709 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- ERROR
08-22 23:29:06.719 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Message - [java.lang.IllegalStateException: closed]
08-22 23:29:06.719 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- RESPONSE 0 https://api.github.com/
08-22 23:29:06.719 29471-29471/com.orhanobut.waspsample D/Wasp﹕ Body - no body
08-22 23:29:06.719 29471-29471/com.orhanobut.waspsample D/Wasp﹕ <--- END (Size: 0 bytes - Network time: 189356 ms)
08-22 23:29:06.719 29471-29471/com.orhanobut.waspsample W/Toast﹕ From com.orhanobut.waspsample, go ahead.
Let me reproduce it, it looks like a different problem occurs
Shouldn't the interface definition should be like with void return.
@GET("/")
void postCityWeather(
Callback<GitHubBean> callback
);
@tasomaniac WaspRequest is a special case which you are able to cancel the request, https://github.com/orhanobut/wasp/wiki/Request-cancelation
It looks like retry policy issue, but still need to check thoroughly.
08-22 20:25:05.565 12211-12225/com.orhanobut.waspsample E/Volley﹕ [2044] NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException: closed java.lang.IllegalStateException: closed at okio.RealBufferedSource.read(RealBufferedSource.java:47) at okio.RealBufferedSource.request(RealBufferedSource.java:71) at okio.RealBufferedSource.require(RealBufferedSource.java:64) at okio.GzipSource.consumeHeader(GzipSource.java:114) at okio.GzipSource.read(GzipSource.java:73) at okio.RealBufferedSource$1.read(RealBufferedSource.java:349) at java.io.InputStream.read(InputStream.java:162) at com.android.volley.toolbox.BasicNetwork.entityToBytes(BasicNetwork.java:253) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:129) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)