Giter Site home page Giter Site logo

square / retrofit Goto Github PK

View Code? Open in Web Editor NEW
42.6K 1.6K 7.3K 4.91 MB

A type-safe HTTP client for Android and the JVM

Home Page: https://square.github.io/retrofit/

License: Apache License 2.0

Java 35.67% CSS 2.42% HTML 60.40% Kotlin 1.37% JavaScript 0.15%
java android

retrofit's Introduction

Retrofit

A type-safe HTTP client for Android and Java.

For more information please see the website.

Download

Download the latest JAR or grab from Maven central at the coordinates com.squareup.retrofit2:retrofit:2.11.0.

Snapshots of the development version are available in Sonatype's snapshots repository.

Retrofit requires at minimum Java 8+ or Android API 21+.

R8 / ProGuard

If you are using R8 the shrinking and obfuscation rules are included automatically.

ProGuard users must manually add the options from retrofit2.pro. You might also need rules for OkHttp and Okio which are dependencies of this library.

License

Copyright 2013 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

retrofit's People

Contributors

chriscizek avatar codebutler avatar crazybob avatar dependabot[bot] avatar dnkoutso avatar eburke avatar edenman avatar f2prateek avatar goooler avatar guptasourabh04 avatar holmes avatar icastell avatar jakewharton avatar jawnnypoo avatar jaynewstrom avatar jjnford avatar koalahamlet avatar kryali avatar loganj avatar nightlynexus avatar ojh102 avatar pforhan avatar promansew avatar rcdickerson avatar renovate[bot] avatar rjrjr avatar sageseid avatar swankjesse avatar turbo87 avatar vanniktech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retrofit's Issues

Content-Type header is being sent twice...

In a small app I am writing, the Content-Type header is being sent more than once. This is causing a problem with parsing the HTTP request on a node.js/Express server. If I replay the request without the duplication, the request is received properly by the server.

I'll look into why it is happening and see if I can send a push request for the fix.

ProGuard and Retrofit don't enjoy each other...

I think some documentation on proper proguard configuration for Retrofit would be great. Any idea what lines I would put into progaurd.cfg to avoid the following errors:

12-10 17:18:11.523: WARN/RestAdapter(3135): Method not annotated with GET, POST, PUT, or DELETE: public abstract void com.calgaryscientific.oncall.service.OnCallServiceAsync.deleteUser(java.lang.String,retrofit.http.Callback) from https://csi-oncall.herokuapp.com/
        java.lang.IllegalStateException: Method not annotated with GET, POST, PUT, or DELETE: public abstract void com.calgaryscientific.oncall.service.OnCallServiceAsync.deleteUser(java.lang.String,retrofit.http.Callback)
        at retrofit.http.RequestLine.fromMethod(RequestLine.java:64)
        at retrofit.http.HttpRequestBuilder.setMethod(HttpRequestBuilder.java:52)
        at retrofit.http.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:137)
        at retrofit.http.RestAdapter$RestHandler.access$400(RestAdapter.java:102)
        at retrofit.http.RestAdapter$RestHandler$1.obtainResponse(RestAdapter.java:115)
        at retrofit.http.CallbackRunnable.run(CallbackRunnable.java:30)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at retrofit.http.Platform$Android$2$1.run(Platform.java:93)
        at java.lang.Thread.run(Thread.java:856)

Always Serialize Body Params Synchronously

If a mutable object is passed in we want to serialize it to its request representation immediately to prevent callers from modifying the object and sending unexpected data.

Header Parameters

I'd like to be able to set one or more headers. In this case, it is a logout command. I've also run into this for apis that incorrectly expect Content-Type sent on GET commands without payload.

Ex.

@DELETE("/Session")
void logout(@Header @Name("Auth-Token") String token);

I can write support for this, but wanted to check first if you have other ideas.

RequestBuilderTest#testNormalPutWithPathParams Broken?

Given

@PUT("foo/bar/{id}")
void normalPut(@Named("id") String id, @Named("body") String body, Callback<SimpleResponse> callback);

Where id is "123" and body is "456" it expects a URL of foo/bar/123 and a request body of id=123&body=456.

This seems broken as the id param was used in the URL so including it in the request body is redundant.

(I have this fixed on a local branch, just need to remember to follow-up as to whether this behavior is desired or not)

More descriptive error when Executors aren't set

I recently switched my RestAdapter interface to use Callbacks, but threw a NullPointerException because I didn't call setExecutors in RestAdapter.Builder. Took me a couple hours to figure out what was going on, so I feel like it might be nice to have a custom message when a null HttpExecutor or CallbackExecutor is found.

I can make a pull request and implement this if you guys want.

shortcut for decluttering json responses

Often json responses are wrapped with envelopes, and the real data you want is under a field named data or something. In other libraries, I've built a gson helper to unwrap this stuff.

Ex. for the server response { "data" : {"foo": "bar"} } using @SelectJson("data") would start parsing at {"foo": "bar"}

What's the cleanest way to accomplish this in retrofit? I don't mind implementing something if it would help others.

Throwing RetrofitError in mock RestClients

So the use of interfaces to define the client allows you to easily implement a fake client that doesn't use HTTP requests and generates responses from static resources. But, RetrofitError is a core component of interaction for the code interacting with the client. Particularly, for error status from the client. I want to be able to throw Retrofit errors in my fake client to simulate error statuses from HTTP requests.

My specific use case:

  1. Collection of static JSON files for fake users (fakeuser0.json, fakeuser1.json)
  2. Implement interface that defines Retrofit client
  3. login(username, password) -> find username file
  4. if username isn't fakeuser0 or fakeuser1 -> error status
  5. if username is fakeuser0 or fakeuser1 -> GSON parse corresponding file and return

I think the most minimal change is necessary to allow this interaction: private constructor becomes protected constructor. This would at least allow me to extend RetrofitError so that I can construct one in the fake client.

Drop JSR330 Dependency

@Named --> @Param
Provider --> ClientProvider (?)

abstract class ClientProvider {
  public abstract Client getClient();

  public List<Header> getHeaders() {
    return Collections.emptyList();
  }
}

Change Fetcher API To Report Progress as Float

From @swankjesse on #62:

It would be more conventional for the progress listener to just take a float between 0 and 1. It's sort of weird that a UI decision (progress update granularity) is being decided here.

In slow transfers (say 1MiB over 3G) using percent is lame because multiple reads may yield the same percentage of progress. (10KiB and 19 KiB are both reported as 1% done).

Revisit Support for Nested URL Replacements

Javadoc states:

/**
 * Builds HTTP requests from Java method invocations.  Handles "path parameters" in the
 * {@code apiUrl} in the form of "path/to/url/{id}/action" where a parameter annotated with
 * {@code @Named("id")} is inserted into the url.  Note that this replacement can be recursive if:  
 * <ol>
 * <li>Multiple sets of brackets are nested ("path/to/{{key}a}.</li>
 * <li>The order of {@link javax.inject.Named @Named} values go from innermost to outermost.</li>
 * <li>The values replaced correspond to {@link javax.inject.Named @Named} parameters.</li>
 * </ol>
 */

Still needed/useful?

XML api sample

Would be nice to be able to easily use retrofit for XML apis like AWS. I'll volunteer to make a sample, if you don't mind giving me pointers as to what might be needed in abstract.

Investigate Code Generation For Interface Metadata

Currently we do a lot of work around parsing metadata about endpoint definitions on their first use (and mostly in a background thread, thankfully). However, we could make this even faster by performing this analysis at compile-time and generating a class whose code is structured around this metadata.

For example, #133 wants synchronous serialization of request parameters to prevent sending up the wrong values on mutable instances that are passed in. To do this properly we need to have done a full metadata parse on the method to know which arguments will be used in the URL and which in the body (and how they'll be interpreted). Full metadata parsing is slow which is why we moved it to the background thread and while we'll only incur this penalty once, it still sucks.

Imagine, however, doing all the metadata work at compile-time and generating code which knows how to serialize the data:

Given:

@POST("/some/{thing}/goes/{here}")
void doThings(
  @Name("thing") String thing,
  @SingleEntity Gizmo gizmo,
  @Name("here") Foo here,
  Callback<Whatever> callback
);

we could generate:

Request createRequest(Server server, Headers headers, Converter converter, Object[] args) {
  String host = server.getUrl();
  StringBuilder builder = new StringBuilder();
  builder.append(host);
  if (!host.endsWith("/")) { // Guard against double slashes.
    builder.append("/");
  }
  builder.append("some/");
  builder.append(args[0]);
  builder.append("/goes/");
  builder.append(args[2].toString());
  String url = builder.toString();

  TypedBytes body = converter.toBody(args[1]);

  return new Request("POST", url, headers.get(), body)
}

and then just call it from inside our proxy with the appropriate instances and arguments.

This would eliminate RequestBuilder, RestMethodInfo, and a chunk of RestAdapter.

Add support for constant query string parameters

At present the RestAdapter will simply append GET variables to an endpoint, beginning with a ?

It should be possible to detect the presence of existing query string variables and append Named parameters using ampersands.

Currently it's necessary to provide constant GET variables in every service call as a Named parameter.

// Doesn't quite work
public interface MyServiceAsync {

    // Produces a url like "endpoint?constantVariable=constantValue&page=1".
    @GET("endpoint?constantVariable=constantValue")
    void normalGet(@Named("page") int page,
                   Callback<MyResponse> callback);

}

Log Query Strings.

Would love to see the LOGGER print out a version of the request with a query string if the request is build to use one. This would speed up debugging greatly.

Sending a file

Hello,

first of all thanks for retrofit the lib looks promising.

Is there any way to send a file to a server ? If so, could you add it to the sample in the README.md ?

Thx in advance,
Stéphane

Decoupling retrofit annotation processing and request processing

Hi all,

this is really an idea for an open discussion more than an issue.

The annotation processing (i.e. writing requests via annotations, processing them) ends up with building org.apache.http.client.methods.HttpUriRequest. This class is then being used to explicitly perform an http request by the RestAdapter.

I think it could be interesting to decouple those two features : the first part of retrofit (annotation processing in order to build a HttpUriRequest) could be used on top of all "REST/JSON" engines like spring android or google http java client. And the actual engine of retrofit in charge of executing the request would become a basic, default implementation among others.

Writing a new "plugin" to execute network requests would consist in translating a HttpUriRequest into a given "REST/JSON" library.

Thanks for retrofit, it's a very refreshing technology, a new approach of the whole networking stuff.

Abstract Logging API

Easier control over sending the logs. And deferring string replacements using something like:

public void log(String message, Object... args);

Lazily Cache Endpoint Metadata

We calculate a lot of metadata on endpoint definitions with every invocation. The heavy hitters should be cached in the anonymous proxy class generated by RestAdapter to avoid doing reflection on every API call.

Might be useful to abstract everything into a POJO and use a Map<Method, MethodMetadata> or something.

If no parameters are present after creating request, do not append ? to URI

I have noticed that the ? is always present at the end of URIs. This is completely valid, I suspect, but it was unexpected when I was making some Robolectric unit tests to check if the thing was sending the information to the correct URI. Perhaps, if the parameters are empty (as in there are no parameters to be appended) don't add the ? query parameters separator.

Create manual for sending files with retrofit

Hello!
I'm trying to send image file to server with retrofit, I decided to use TypedFile to do this(I also tried use TypedByteArray with same result). My interface method looks like this:

    @Multipart
    @POST(RestApiConstants.API_URL_USER)
    void registerOrLoginUser(
            @Name("email") String email,
            @Name("name") String name,
            @Name("city") String city,
            @Name("action") String action,
            @Name("password") String password,
            @Name("userpic") TypedFile userpic,
            Callback<User> callback);

In fact now file is sent to server. But our server guy told me that now he see file together with all other params, but this file should be transfered in some other way, to be separated from other params. Actually it's realy hard for me to understand what is wrong with my request, because I don't know how server side works.
He gave me such example of correct request as he see it on server side:

Array
(
    [action] => registration
    [email] => [email protected]
    [name] => Name
    [city] => ZP
)
Array
(
    [userpic] => Array
        (
            [name] => image.jpg
            [type] => image/jpeg
            [tmp_name] => /tmp/phpaxls13
            [error] => 0
            [size] => 151957
        )

)

So I wonder is there other way to send file on server with retrofit? Maybe something wrong with my interface method? Or maybe something wrong with server side?
I've tried to find any examples in net but I've failed.
It would be great if you could make some manual or example of sending files to server.

Add suport for signed requests

I've recently faced with necessity of sending signed requests (for OAuth).
I think it would be great if retrifit has support for this, using signpost, or some other library.
What do you think about it?

Repositiory on Maven central

Hey,

First, thanks for your great work, I'm starting to use this library and it's just clean and awesome! I'm loving it so far.

I noticed you put a lot of your projects on Maven central and I'd love to have one for Retrofit. Is that planned?

Many thanks

Calling error.getBody() in failure(final RetrofitError error) results in NetworkOnMainThreadException

    interface ServerLogin {
        @POST("/account/login")
        void login(@Name("username") String username, @Name("password") String password, Callback<LoginResponse> callback);
    }


// Later in the code
    final RestAdapter restAdapter = new RestAdapter.Builder().setServer(
                "http://[VALID URL]").build();
    final ServerLogin serverLogin = restAdapter.create(ServerLogin.class);
    serverLogin.login(username, password, new Callback<LoginResponse>() {
            public void failure(final RetrofitError error) {
                android.util.Log.i("example", "Error, body: " + error.getBody().toString());

The above example is missing a required parameter so the server responds with a 400 status and a json formatted exception.

When I call getBody or getBodyAs

final LoginResponse res = (LoginResponse) error.getBodyAs(LoginResponse.class);

I get a

E/AndroidRuntime(11620): FATAL EXCEPTION: main
E/AndroidRuntime(11620): android.os.NetworkOnMainThreadException
E/AndroidRuntime(11620):        at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
E/AndroidRuntime(11620):        at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)
E/AndroidRuntime(11620):        at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
E/AndroidRuntime(11620):        at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
E/AndroidRuntime(11620):        at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
E/AndroidRuntime(11620):        at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
E/AndroidRuntime(11620):        at java.io.InputStream.read(InputStream.java:163)
E/AndroidRuntime(11620):        at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
E/AndroidRuntime(11620):        at java.io.BufferedInputStream.read(BufferedInputStream.java:309)
E/AndroidRuntime(11620):        at libcore.net.http.FixedLengthInputStream.read(FixedLengthInputStream.java:45)
E/AndroidRuntime(11620):        at java.io.InputStreamReader.read(InputStreamReader.java:244)
E/AndroidRuntime(11620):        at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:825)
E/AndroidRuntime(11620):        at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:884)
E/AndroidRuntime(11620):        at com.google.gson.stream.JsonReader.consumeNonExecutePrefix(JsonReader.java:405)
E/AndroidRuntime(11620):        at com.google.gson.stream.JsonReader.peek(JsonReader.java:364)
E/AndroidRuntime(11620):        at com.google.gson.Gson.fromJson(Gson.java:792)
E/AndroidRuntime(11620):        at com.google.gson.Gson.fromJson(Gson.java:761)
E/AndroidRuntime(11620):        at retrofit.http.GsonConverter.fromBody(GsonConverter.java:31)
E/AndroidRuntime(11620):        at retrofit.http.RetrofitError.getBody(RetrofitError.java:69)
E/AndroidRuntime(11620):        at [MY PROJECT]
E/AndroidRuntime(11620):        at retrofit.http.CallbackRunnable$2.run(CallbackRunnable.java:33)
E/AndroidRuntime(11620):        at android.os.Handler.handleCallback(Handler.java:725)
E/AndroidRuntime(11620):        at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(11620):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(11620):        at android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime(11620):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11620):        at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(11620):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(11620):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(11620):        at dalvik.system.NativeStart.main(Native Method)

I fixed it by extending retrofit.http.Callback<?> and made it parse the error on a different thread.

Thanks for the library, it is really the best android ReST intergration library I have tried so far.

cannot build the jars

Since git probably ignored the empty test directories - core/src-tests, io/src-tests, the ant build fails with error message indicating that the directory were not found.

You could either add some tests or dummy files to the test directory.

Relax UTF-8 requirements or make configurable

In RestAdapter.invokeRequest(RestMethodInfo methodDetails, Object[] args)

this check (line ~186)

        for (Header header : headers) {
          if (HTTP.CONTENT_TYPE.equalsIgnoreCase(header.getName()) //
              && !UTF_8.equalsIgnoreCase(Utils.parseCharset(header.getValue()))) {
            throw new IOException("Only UTF-8 charset supported.");
          }
        }

Naturally, bombs out on sites that don't "behave properly", like rottentomatoes api. Can this check be made more flexible or removed altogether?

Access to success headers and cookies

Successful callbacks for asynchronous request return the callback object but it would be nice to have access to the client response so there is access to the headers and cookies. I've not found a way to access cookies for future http request to the same url.

Support Inherited Generic Types

Un-@Ignore the generic type test in RestAdapterTest which exercises this behavior. This probably will mean fleshing out the Types helpers either using GSON or Guice helpers.

Access security Webserver through https will cause crash in Android 2.3

Here is Crash log:

05-08 17:17:49.212: W/dalvikvm(766): threadid=9: thread exiting with uncaught exception (group=0x40015560)
05-08 17:17:49.232: E/AndroidRuntime(766): FATAL EXCEPTION: IntentService[OrganizationFetchService]
05-08 17:17:49.232: E/AndroidRuntime(766): retrofit.http.RetrofitError: javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate signature.
05-08 17:17:49.232: E/AndroidRuntime(766): at retrofit.http.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:235)
05-08 17:17:49.232: E/AndroidRuntime(766): at retrofit.http.RestAdapter$RestHandler.invoke(RestAdapter.java:135)
05-08 17:17:49.232: E/AndroidRuntime(766): at com.example.restful.data.$Proxy0.getTree(Native Method)
05-08 17:17:49.232: E/AndroidRuntime(766): at com.example.restful.data.OrgClient.GET(OrgClient.java:231)
05-08 17:17:49.232: E/AndroidRuntime(766): at com.example.restful.OrgInfoFetchService.onHandleIntent(OrgInfoFetchService.java:36)
05-08 17:17:49.232: E/AndroidRuntime(766): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
05-08 17:17:49.232: E/AndroidRuntime(766): at android.os.Handler.dispatchMessage(Handler.java:99)
05-08 17:17:49.232: E/AndroidRuntime(766): at android.os.Looper.loop(Looper.java:123)
05-08 17:17:49.232: E/AndroidRuntime(766): at android.os.HandlerThread.run(HandlerThread.java:60)
05-08 17:17:49.232: E/AndroidRuntime(766): Caused by: javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate signature.
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:477)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.setupSecureSocket(HttpConnection.java:185)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:433)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeConnection(HttpsURLConnectionImpl.java:378)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1018)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:726)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:121)
05-08 17:17:49.232: E/AndroidRuntime(766): at retrofit.http.client.UrlConnectionClient.readResponse(UrlConnectionClient.java:47)
05-08 17:17:49.232: E/AndroidRuntime(766): at retrofit.http.client.UrlConnectionClient.execute(UrlConnectionClient.java:19)
05-08 17:17:49.232: E/AndroidRuntime(766): at retrofit.http.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:185)
05-08 17:17:49.232: E/AndroidRuntime(766): ... 8 more
05-08 17:17:49.232: E/AndroidRuntime(766): Caused by: java.security.cert.CertificateException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate signature.
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:161)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:664)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:474)
05-08 17:17:49.232: E/AndroidRuntime(766): ... 18 more
05-08 17:17:49.232: E/AndroidRuntime(766): Caused by: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate signature.
05-08 17:17:49.232: E/AndroidRuntime(766): at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1504)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:293)
05-08 17:17:49.232: E/AndroidRuntime(766): at java.security.cert.CertPathValidator.validate(CertPathValidator.java:197)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:156)
05-08 17:17:49.232: E/AndroidRuntime(766): ... 21 more
05-08 17:17:49.232: E/AndroidRuntime(766): Caused by: java.security.SignatureException: Signature was not verified
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.security.provider.cert.X509CertImpl.fastVerify(X509CertImpl.java:595)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.apache.harmony.security.provider.cert.X509CertImpl.verify(X509CertImpl.java:508)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.bouncycastle.jce.provider.CertPathValidatorUtilities.verifyX509Certificate(CertPathValidatorUtilities.java:1551)
05-08 17:17:49.232: E/AndroidRuntime(766): at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1496)
05-08 17:17:49.232: E/AndroidRuntime(766): ... 24 more
05-08 17:17:49.393: W/IInputConnectionWrapper(766): showStatusIcon on inactive InputConnection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.