How to disable GZipContent in Cloud Endpoints builder in Android

前端 未结 3 776
迷失自我
迷失自我 2021-02-09 06:30

I want to disable GZipContent for a Google Cloud Endpoints class so that a POST can work on the local development server.

The latest GPE release generates this endpoint

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-09 07:05

    You can use:

    builder.setGoogleClientRequestInitializer(new TictactoeRequestInitializer() {
         protected void initializeTictactoeRequest(TictactoeRequest request) {
             request.setDisableGZipContent(true);
         }
       });
    

    Replace TictactoeRequest with the appropriate class for your application.

提交回复
热议问题