OkHttpRequestFactory
class OkHttpRequestFactory(baseURI: URITemplate, httpClient: OkHttpClient = OkHttpClient(), eventHttpClient: OkHttpClient = httpClient.reconfiguredForEvents(), val mediaTypeEncoders: MediaTypeEncoders = MediaTypeEncoders.default, val mediaTypeDecoders: MediaTypeDecoders = MediaTypeDecoders.default) : RequestFactory, Closeable
Constructors
Link copied to clipboard
fun OkHttpRequestFactory(baseURI: URITemplate, httpClient: OkHttpClient = OkHttpClient(), eventHttpClient: OkHttpClient = httpClient.reconfiguredForEvents(), mediaTypeEncoders: MediaTypeEncoders = MediaTypeEncoders.default, mediaTypeDecoders: MediaTypeDecoders = MediaTypeDecoders.default)
Types
Functions
Link copied to clipboard
fun eventSource(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): EventSource
fun <B : Any> eventSource(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): EventSource
Link copied to clipboard
fun <D : Any> eventStream(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?, decoder: (TextMediaTypeDecoder, String?, String?, String, Logger) -> D?): Flow<D>
fun <B : Any, D : Any> eventStream(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?, decoder: (TextMediaTypeDecoder, String?, String?, String, Logger) -> D?): Flow<D>
Link copied to clipboard
Link copied to clipboard
inline suspend fun request(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): Request
open suspend override fun <B : Any> request(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?, purpose: RequestFactory.RequestPurpose): Request
Link copied to clipboard
inline suspend fun response(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): Response
inline suspend fun <B : Any> response(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): Response
Link copied to clipboard
inline suspend fun <R : Any> result(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): R
Link copied to clipboard
inline suspend fun <R : Any> resultResponse(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): ResultResponse<R>
inline suspend fun <B : Any, R : Any> resultResponse(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?): ResultResponse<R>
suspend fun <B : Any, R : Any> resultResponse(method: Method, pathTemplate: String, pathParameters: Parameters?, queryParameters: Parameters?, body: B?, contentTypes: List<MediaType>?, acceptTypes: List<MediaType>?, headers: Parameters?, resultType: KType): ResultResponse<R>