java.lang.Object
org.miaixz.bus.http.plugin.httpz.RequestBuilder<HeadBuilder>
org.miaixz.bus.http.plugin.httpz.HeadBuilder
A builder for creating HTTP HEAD requests using a fluent interface. This class allows for setting the URL, query
parameters, headers, a tag, and a request ID.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringAppends the given query parameters to the URL string.build()Builds theRequestCallfor the HEAD request.Methods inherited from class org.miaixz.bus.http.plugin.httpz.RequestBuilder
addEncoded, addEncoded, addHeader, addHeader, addParam, addParam, addParam, id, tag, url
-
Constructor Details
-
HeadBuilder
Constructs a newHeadBuilder.- Parameters:
httpd- TheHttpdclient instance.
-
-
Method Details
-
build
Builds theRequestCallfor the HEAD request. If any query parameters have been added, they will be appended to the URL.- Specified by:
buildin classRequestBuilder<HeadBuilder>- Returns:
- A
RequestCallobject ready to be executed.
-
append
Appends the given query parameters to the URL string.- Parameters:
url- The original URL.params- The map of query parameters to append.- Returns:
- The new URL with the appended query parameters.
-