Tôi muốn tắt GZipContent cho lớp Google Cloud Endpoints sao cho POST có thể hoạt động trên máy chủ phát triển cục bộ.Cách tắt trình tạo GZipContent trong Cloud Endpoints trong Android
Phiên bản mới nhất GPE tạo xây dựng thiết bị đầu cuối này:
public static final class Builder extends AbstractGoogleJsonClient.Builder {
public Builder(HttpTransport transport, JsonFactory jsonFactory,
HttpRequestInitializer httpRequestInitializer) {
super(
transport,
jsonFactory,
...);
}
và tài liệu Google khuyến cáo sử dụng nó như thế này:
Myendpoint.Builder endpointBuilder = new Myendpoint.Builder(
AndroidHttp.newCompatibleTransport(),
new GsonFactory(),
credential);
Có ai biết làm thế nào để vô hiệu hóa GZipContent cho thiết bị đầu cuối?
Cảm ơn.
Cảm ơn Dan! Điều đó có vẻ vừa phải (tôi nhận thấy sự kiểm soát trong xxxxxRequestInitializer nhưng không chắc chắn làm thế nào để sử dụng nó). Tôi sẽ kiểm tra sau này khi tôi làm xong công việc ban ngày của mình và chấp nhận câu trả lời sau đó. – aez