Package com.squareup.okhttp
Class Headers.Builder
- java.lang.Object
-
- com.squareup.okhttp.Headers.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Headers.Builderadd(String line)Add an header line containing a field name, a literal colon, and a value.Headers.Builderadd(String name, String value)Add a field with the specified value.Headersbuild()Stringget(String name)Equivalent tobuild().get(name), but potentially faster.Headers.BuilderremoveAll(String name)Headers.Builderset(String name, String value)Set a field with the specified value.
-
-
-
Method Detail
-
add
public Headers.Builder add(String line)
Add an header line containing a field name, a literal colon, and a value.
-
add
public Headers.Builder add(String name, String value)
Add a field with the specified value.
-
removeAll
public Headers.Builder removeAll(String name)
-
set
public Headers.Builder set(String name, String value)
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.
-
build
public Headers build()
-
-