1776654103
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
```java
|
||||
package cn.bugstack.ai.infrastructure.gateway;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.HeaderMap;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.QueryMap;
|
||||
import retrofit2.http.Url;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资料:<a href="https://bugstack.cn/md/road-map/http.html">HTTP 框架案例</a>
|
||||
*/
|
||||
public interface GenericHttpGateway {
|
||||
|
||||
@POST
|
||||
Call<ResponseBody> post(
|
||||
@Url String url,
|
||||
@HeaderMap Map<String, Object> headers,
|
||||
@Body RequestBody body
|
||||
);
|
||||
|
||||
@GET
|
||||
Call<ResponseBody> get(
|
||||
@Url String url,
|
||||
@HeaderMap Map<String, Object> headers,
|
||||
@QueryMap Map<String, Object> queryParams
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user