Interface HttpFields

All Superinterfaces:
Iterable<HttpField>, Supplier<HttpFields>
All Known Subinterfaces:
HttpFields.Mutable
All Known Implementing Classes:
HttpFields.ImmutableHttpFields, HttpFields.Mutable.Wrapper, HttpFields.MutableHttpFields, HttpTester.Message, HttpTester.Request, HttpTester.Response

public interface HttpFields extends Iterable<HttpField>, Supplier<HttpFields>

An ordered collection of HttpFields that represent the HTTP headers or HTTP trailers of an HTTP request or an HTTP response.

HttpFields is immutable and typically used in server-side HTTP requests and client-side HTTP responses, while HttpFields.Mutable is mutable and typically used in server-side HTTP responses and client-side HTTP requests.

Access is always more efficient using HttpHeader keys rather than String field names.

The primary implementations of HttpFields have been optimized assuming few lookup operations, thus typically if many HttpFields need to looked up, it may be better to use an Iterator to find multiple fields in a single iteration.