public final class OkHttpHttpClient extends Object implements HalfDuplexClient
| 构造器和说明 |
|---|
OkHttpHttpClient(okhttp3.OkHttpClient client) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
close(int code,
String reason) |
DashScopeResult |
send(HalfDuplexRequest req)
Blocking send http request and get the response body.
|
void |
send(HalfDuplexRequest req,
ResultCallback<DashScopeResult> callback) |
io.reactivex.Flowable<DashScopeResult> |
streamOut(HalfDuplexRequest req) |
void |
streamOut(HalfDuplexRequest req,
ResultCallback<DashScopeResult> callback) |
public DashScopeResult send(HalfDuplexRequest req) throws NoApiKeyException, ApiException
HalfDuplexClientsend 在接口中 HalfDuplexClientreq - the user input data and parameters.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.public void send(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) throws NoApiKeyException, ApiException
send 在接口中 HalfDuplexClientNoApiKeyExceptionApiExceptionpublic io.reactivex.Flowable<DashScopeResult> streamOut(HalfDuplexRequest req) throws NoApiKeyException, ApiException
streamOut 在接口中 HalfDuplexClientNoApiKeyExceptionApiExceptionpublic void streamOut(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) throws NoApiKeyException, ApiException
streamOut 在接口中 HalfDuplexClientNoApiKeyExceptionApiExceptionpublic boolean close(int code,
String reason)
close 在接口中 HalfDuplexClientCopyright © 2025. All rights reserved.