T
- the generic typepublic interface ServiceCall<T>
Modifier and Type | Method and Description |
---|---|
ServiceCall<T> |
addHeader(java.lang.String name,
java.lang.String value)
Add a header to the request before executing.
|
void |
cancel()
Cancel the current request if possible.
|
void |
enqueue(ServiceCallback<T> callback)
Asynchronous request with added HTTP information.
|
Response<T> |
execute()
Synchronous request.
|
io.reactivex.Single<Response<T>> |
reactiveRequest()
Reactive request using the RxJava 2 library.
|
ServiceCall<T> addHeader(java.lang.String name, java.lang.String value)
name
- the name of the headervalue
- the value of the headerResponse<T> execute() throws java.lang.RuntimeException
java.lang.RuntimeException
- the exception from HTTP requestvoid enqueue(ServiceCallback<T> callback)
callback
- the callbackio.reactivex.Single<Response<T>> reactiveRequest()
void cancel()
Copyright © 2022 IBM Cloud Developer Experience. All rights reserved.