Class OkHttpHttpClient
java.lang.Object
com.alibaba.dashscope.legacy_2x.protocol.okhttp.OkHttpHttpClient
- All Implemented Interfaces:
HalfDuplexClient
Deprecated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.send(HalfDuplexRequest req) Deprecated.Blocking send http request and get the response body.voidsend(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) Deprecated.io.reactivex.Flowable<DashScopeResult>Deprecated.voidstreamOut(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) Deprecated.
-
Constructor Details
-
OkHttpHttpClient
public OkHttpHttpClient(okhttp3.OkHttpClient client) Deprecated.
-
-
Method Details
-
send
Deprecated.Description copied from interface:HalfDuplexClientBlocking send http request and get the response body.- Specified by:
sendin interfaceHalfDuplexClient- Parameters:
req- the user input data and parameters.- Returns:
- The the `DashScopeResult`.
- Throws:
NoApiKeyException- Can not find api keyApiException- The request failed, possibly due to a network or data error.
-
send
public void send(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) throws NoApiKeyException, ApiException Deprecated.- Specified by:
sendin interfaceHalfDuplexClient- Throws:
NoApiKeyExceptionApiException
-
streamOut
public io.reactivex.Flowable<DashScopeResult> streamOut(HalfDuplexRequest req) throws NoApiKeyException, ApiException Deprecated.- Specified by:
streamOutin interfaceHalfDuplexClient- Throws:
NoApiKeyExceptionApiException
-
streamOut
public void streamOut(HalfDuplexRequest req, ResultCallback<DashScopeResult> callback) throws NoApiKeyException, ApiException Deprecated.- Specified by:
streamOutin interfaceHalfDuplexClient- Throws:
NoApiKeyExceptionApiException
-
close
Deprecated.- Specified by:
closein interfaceHalfDuplexClient
-