All Downloads are FREE. Search and download functionalities are using the official Maven repository.

retrofit.MockHttpRetrofitError Maven / Gradle / Ivy

// Copyright 2013 Square, Inc.
package retrofit;

import java.lang.reflect.Type;
import retrofit.client.Response;

class MockHttpRetrofitError extends RetrofitError {
  private final Object body;

  MockHttpRetrofitError(String url, Response response, Object body) {
    super(url, response, null, null, false, null);
    this.body = body;
  }

  @Override public Object getBody() {
    return body;
  }

  @Override public Object getBodyAs(Type type) {
    return body;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy