Package org.miaixz.bus.http
Class Headers.Builder
java.lang.Object
org.miaixz.bus.http.Headers.Builder
- Enclosing class:
Headers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an header line containing a field name, a literal colon, and a value.Add a header with the specified name and value.Add a header with the specified name and formatted instant.Add a header with the specified name and formatted date.Adds all headers from an existing collection.addLenient(String line) Add a header line without any validation.addUnsafeNonAscii(String name, String value) Add a header with the specified name and value.build()Equivalent tobuild().get(name), but potentially faster.Set a field with the specified value.Set a field with the specified instant.Set a field with the specified date.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addLenient
Add a header line without any validation. Only appropriate for headers from the remote peer or cache. -
add
Add an header line containing a field name, a literal colon, and a value. -
add
Add a header with the specified name and value. Does validation of header names and values. -
addUnsafeNonAscii
Add a header with the specified name and value. Does validation of header names, allowing non-ASCII values. -
addAll
Adds all headers from an existing collection. -
add
Add a header with the specified name and formatted date. Does validation of header names and value. -
add
Add a header with the specified name and formatted instant. Does validation of header names and value. -
set
Set a field with the specified date. If the field is not found, it is added. If the field is found, the existing values are replaced. -
set
Set a field with the specified instant. If the field is not found, it is added. If the field is found, the existing values are replaced. -
removeAll
-
set
Set a field with the specified value. If the field is not found, it is added. If the field is found, the existing values are replaced. -
get
Equivalent tobuild().get(name), but potentially faster. -
build
-