Interface ProxyHttpClient

All Known Implementing Classes:
DefaultHttpClient

public interface ProxyHttpClient
Interface that allows proxying of HTTP requests in controllers and filters.
Since:
2.0.0
Author:
graemerocher
  • Method Details

    • proxy

      Proxy the given request and emit the response. This method expects the full absolute URL to be included in the request. If a relative URL is specified then the method will try to resolve the URI for the current server otherwise an exception will be thrown.
      Parameters:
      request - The request
      Returns:
      A publisher that emits the response.
    • proxy

      Proxy the given request and emit the response. This method expects the full absolute URL to be included in the request. If a relative URL is specified then the method will try to resolve the URI for the current server otherwise an exception will be thrown.
      Parameters:
      request - The request
      options - Further options for the proxy request
      Returns:
      A publisher that emits the response.
      Since:
      3.5.0
    • create

      static ProxyHttpClient create(@Nullable @Nullable URL url)
      Create a new ProxyHttpClient. Note that this method should only be used outside of the context of a Micronaut application. The returned ProxyHttpClient 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
    • create

      Create a new ProxyHttpClient 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.2.0