Android代码 retrofit2 synchronous adapter

weixin_39882200 22 0 ZIP 2021-04-19 07:04:40

Retrofit 2 Synchronous Adapter A synchronous CallAdapter.Factory implementation for Retrofit 2. This project brings Retrofit 1's synchronous usage to Retrofit 2. Usage // Setup retrofit Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.example.com") .addCallAdapterFactory(SynchronousCallAdapterFactory.create()) .build(); // Create your service interface Service { @GET("/") ApiResponse response(); // Return type directly @GET("/") Response responseApi(

用户评论
请输入评论内容
评分:
暂无评论