Module bus.http

Class Httpz.Client

java.lang.Object
org.miaixz.bus.http.Httpz.Client
Enclosing class:
Httpz

public static class Httpz.Client extends Object
The inner client class that manages the execution and cancellation of HTTP requests.
  • Constructor Details

    • Client

      public Client()
      Default constructor that initializes the Httpd client with SSL configuration.
    • Client

      public Client(Httpd httpd)
      Initializes with a specified Httpd client.
      Parameters:
      httpd - The Httpd client.
  • Method Details

    • cancelAll

      public static void cancelAll()
      Cancels all queued or running requests using the default client.
    • cancelAll

      public static void cancelAll(Httpd httpd)
      Cancels all queued or running requests for a specific client.
      Parameters:
      httpd - The Httpd client.
    • cancel

      public static void cancel(Object tag)
      Cancels requests with a specific tag using the default client.
      Parameters:
      tag - The request tag.
    • cancel

      public static void cancel(Httpd httpd, Object tag)
      Cancels requests with a specific tag for a specific client.
      Parameters:
      httpd - The Httpd client.
      tag - The request tag.
    • get

      public GetBuilder get()
      Creates a GetBuilder for constructing GET requests.
      Returns:
      a new GetBuilder instance.
    • post

      public PostBuilder post()
      Creates a PostBuilder for constructing POST requests.
      Returns:
      a new PostBuilder instance.
    • put

      public PutBuilder put()
      Creates a PutBuilder for constructing PUT requests.
      Returns:
      a new PutBuilder instance.
    • head

      public HeadBuilder head()
      Creates a HeadBuilder for constructing HEAD requests.
      Returns:
      a new HeadBuilder instance.
    • delete

      public DeleteBuilder delete()
      Creates a DeleteBuilder for constructing DELETE requests.
      Returns:
      a new DeleteBuilder instance.
    • getHttpd

      public Httpd getHttpd()
      Gets the current Httpd client.
      Returns:
      the Httpd instance.
    • setHttpd

      public void setHttpd(Httpd httpd)
      Sets the Httpd client.
      Parameters:
      httpd - the Httpd instance.