类 HttpRequest

java.lang.Object
io.agentscope.core.model.transport.HttpRequest

public class HttpRequest extends Object
HTTP request encapsulation for the transport layer.

This class represents an HTTP request with URL, method, headers, and body. Use the builder pattern to construct requests.

  • 方法详细资料

    • getUrl

      public String getUrl()
      Get the request URL.
      返回:
      the URL
    • getMethod

      public String getMethod()
      Get the HTTP method.
      返回:
      the method (GET, POST, etc.)
    • getHeaders

      public Map<String,String> getHeaders()
      Get the request headers.
      返回:
      an unmodifiable map of headers
    • getBody

      public String getBody()
      Get the request body.
      返回:
      the body string, or null if no body
    • builder

      public static HttpRequest.Builder builder()
      Create a new builder for HttpRequest.
      返回:
      a new Builder instance