Module bus.http

Class DeleteRequest

java.lang.Object
org.miaixz.bus.http.plugin.httpz.HttpRequest
org.miaixz.bus.http.plugin.httpz.DeleteRequest

public class DeleteRequest extends HttpRequest
Represents an HTTP DELETE request. This class encapsulates all the parameters and configuration for a DELETE request. DELETE requests are used to delete a specified resource and typically do not have a request body.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • DeleteRequest

      public DeleteRequest(String url, Object tag, Map<String,String> params, Map<String,String> headers, String id)
      Constructs a new DeleteRequest.
      Parameters:
      url - The request URL.
      tag - A tag for this request, used for cancellation.
      params - The query parameters for the request.
      headers - The request headers.
      id - A unique identifier for this request.
  • Method Details

    • buildRequestBody

      protected RequestBody buildRequestBody()
      Builds the request body. For a DELETE request, the body is always null.
      Specified by:
      buildRequestBody in class HttpRequest
      Returns:
      Always returns null.
    • buildRequest

      protected Request buildRequest(RequestBody requestBody)
      Builds the final Httpd Request object.
      Specified by:
      buildRequest in class HttpRequest
      Parameters:
      requestBody - The request body, which will be null for a DELETE request.
      Returns:
      The constructed Request object.