Interface Rx3HttpClient

All Superinterfaces:
AutoCloseable, Closeable, io.micronaut.http.client.HttpClient, io.micronaut.context.LifeCycle<io.micronaut.http.client.HttpClient>
All Known Subinterfaces:
Rx3StreamingHttpClient

public interface Rx3HttpClient extends io.micronaut.http.client.HttpClient
RxJava 3 variation of the HttpClient interface.
Since:
1.0.0
Author:
graemerocher
  • Field Summary

    Fields inherited from interface io.micronaut.http.client.HttpClient

    DEFAULT_ERROR_TYPE
  • Method Summary

    Modifier and Type
    Method
    Description
    create(@Nullable URL url)
    Create a new Rx3HttpClient.
    create(@Nullable URL url, @NonNull io.micronaut.http.client.HttpClientConfiguration configuration)
    Create a new Rx3HttpClient with the specified configuration.
    default <I> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<io.micronaut.core.io.buffer.ByteBuffer>>
    exchange(@NonNull io.micronaut.http.HttpRequest<I> request)
     
    default <I, O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>>
    exchange(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull io.micronaut.core.type.Argument<O> bodyType)
     
    <I, O, E> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>>
    exchange(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull io.micronaut.core.type.Argument<O> bodyType, @NonNull io.micronaut.core.type.Argument<E> errorType)
     
    default <I, O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>>
    exchange(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull Class<O> bodyType)
     
    default io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<io.micronaut.core.io.buffer.ByteBuffer>>
    exchange(@NonNull String uri)
     
    default <O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>>
    exchange(@NonNull String uri, @NonNull Class<O> bodyType)
     
    default <I> io.reactivex.rxjava3.core.Flowable<String>
    retrieve(@NonNull io.micronaut.http.HttpRequest<I> request)
     
    default <I, O> io.reactivex.rxjava3.core.Flowable<O>
    retrieve(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull io.micronaut.core.type.Argument<O> bodyType)
     
    default <I, O, E> io.reactivex.rxjava3.core.Flowable<O>
    retrieve(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull io.micronaut.core.type.Argument<O> bodyType, @NonNull io.micronaut.core.type.Argument<E> errorType)
     
    default <I, O> io.reactivex.rxjava3.core.Flowable<O>
    retrieve(@NonNull io.micronaut.http.HttpRequest<I> request, @NonNull Class<O> bodyType)
     
    default io.reactivex.rxjava3.core.Flowable<String>
    retrieve(@NonNull String uri)
     

    Methods inherited from interface io.micronaut.http.client.HttpClient

    refresh, toBlocking

    Methods inherited from interface io.micronaut.context.LifeCycle

    close, isRunning, start, stop
  • Method Details

    • exchange

      default <I, O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>> exchange(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull io.micronaut.core.type.Argument<O> bodyType)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • exchange

      <I, O, E> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>> exchange(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull io.micronaut.core.type.Argument<O> bodyType, @NonNull @NonNull io.micronaut.core.type.Argument<E> errorType)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • retrieve

      default <I, O, E> io.reactivex.rxjava3.core.Flowable<O> retrieve(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull io.micronaut.core.type.Argument<O> bodyType, @NonNull @NonNull io.micronaut.core.type.Argument<E> errorType)
      Specified by:
      retrieve in interface io.micronaut.http.client.HttpClient
    • exchange

      default <I> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<io.micronaut.core.io.buffer.ByteBuffer>> exchange(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • exchange

      default io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<io.micronaut.core.io.buffer.ByteBuffer>> exchange(@NonNull @NonNull String uri)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • exchange

      default <O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>> exchange(@NonNull @NonNull String uri, @NonNull @NonNull Class<O> bodyType)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • exchange

      default <I, O> io.reactivex.rxjava3.core.Flowable<io.micronaut.http.HttpResponse<O>> exchange(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull Class<O> bodyType)
      Specified by:
      exchange in interface io.micronaut.http.client.HttpClient
    • retrieve

      default <I, O> io.reactivex.rxjava3.core.Flowable<O> retrieve(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull io.micronaut.core.type.Argument<O> bodyType)
      Specified by:
      retrieve in interface io.micronaut.http.client.HttpClient
    • retrieve

      default <I, O> io.reactivex.rxjava3.core.Flowable<O> retrieve(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request, @NonNull @NonNull Class<O> bodyType)
      Specified by:
      retrieve in interface io.micronaut.http.client.HttpClient
    • retrieve

      default <I> io.reactivex.rxjava3.core.Flowable<String> retrieve(@NonNull @NonNull io.micronaut.http.HttpRequest<I> request)
      Specified by:
      retrieve in interface io.micronaut.http.client.HttpClient
    • retrieve

      default io.reactivex.rxjava3.core.Flowable<String> retrieve(@NonNull @NonNull String uri)
      Specified by:
      retrieve in interface io.micronaut.http.client.HttpClient
    • create

      static Rx3HttpClient create(@Nullable @Nullable URL url)
      Create a new Rx3HttpClient. Note that this method should only be used outside of the context of a Micronaut application. The returned Rx3HttpClient is not subject to dependency injection. The creator is responsible for closing the client to avoid leaking connections. Within a Micronaut application use Inject to inject a client instead.
      Parameters:
      url - The base URL
      Returns:
      The client
      Since:
      2.1.0
    • create

      static Rx3HttpClient create(@Nullable @Nullable URL url, @NonNull @NonNull io.micronaut.http.client.HttpClientConfiguration configuration)
      Create a new Rx3HttpClient with the specified configuration. Note that this method should only be used outside of the context of an application. Within Micronaut use Inject to inject a client instead
      Parameters:
      url - The base URL
      configuration - the client configuration
      Returns:
      The client
      Since:
      2.1.0