# Uses of Class
com.sun.net.httpserver.Headers

Packages that use Headers
Package
Description
com.sun.net.httpserver
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers.

- ## Uses of Headers in com.sun.net.httpserver

  Methods in com.sun.net.httpserver that return Headers
  Modifier and Type
  Method
  Description
  `abstract Headers`
  HttpExchange.`getRequestHeaders()`
  Returns an immutable `Headers` containing the HTTP headers that were included with this request.
  `Headers`
  Request.`getRequestHeaders()`
  Returns an immutable `Headers` containing the HTTP headers that were included with this request.
  `abstract Headers`
  HttpExchange.`getResponseHeaders()`
  Returns a mutable `Headers` into which the HTTP response headers can be stored and which will be transmitted as part of this response.
  `static Headers`
  Headers.`of(String... headers)`
  Returns an immutable `Headers` with the given name value pairs as its set of headers.
  `static Headers`
  Headers.`of(Map<String,List<String>> headers)`
  Returns an immutable `Headers` from the given `headers` with the same header names and values.
  Methods in com.sun.net.httpserver with parameters of type Headers
  Modifier and Type
  Method
  Description
  `static HttpHandler`
  HttpHandlers.`of(int statusCode, Headers headers, String body)`
  Returns an `HttpHandler` that sends a response comprising the given `statusCode`, `headers`, and `body`.