java.lang.Object
ai.docling.serve.api.convert.request.source.Source
ai.docling.serve.api.convert.request.source.HttpSource

public final class HttpSource extends Source
Represents an HTTP-based data source. This class is a concrete implementation of Source and provides functionality for configuring an HTTP endpoint with optional headers.

JSON serialization/deserialization:

  • url - Represents the URI of the HTTP source.
  • headers - A map of custom HTTP headers for the request.

By default, JSON includes non-empty fields only.

  • Method Details

    • builder

      public static @NonNull HttpSource.Builder builder()
    • toBuilder

      public @NonNull HttpSource.Builder toBuilder()
    • getUrl

      @NonNull public @NonNull URI getUrl()
      HTTP url to process.
      Returns:
      the HTTP URL
    • getHeaders

      public Map<String,Object> getHeaders()
      Additional headers used to fetch the urls, e.g. authorization, agent, etc.
      Returns:
      the map of HTTP headers
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Source