io.undertow.server.handlers

## Class SetHeaderHandler

- java.lang.Object
- - io.undertow.server.handlers.SetHeaderHandler

All Implemented Interfaces:
  HttpHandler

    public class SetHeaderHandler
    extends Object
    implements HttpHandler

Set a fixed response header.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static class` `SetHeaderHandler.Builder`

### Constructor Summary

Constructors
Constructor and Description
`SetHeaderHandler(HttpHandler next, String header, ExchangeAttribute value)`
`SetHeaderHandler(HttpHandler next, String header, String value)`
`SetHeaderHandler(String header, String value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`HttpString` `getHeader()`
`ExchangeAttribute` `getValue()`
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SetHeaderHandler

    public SetHeaderHandler(String header,
                            String value)

#### SetHeaderHandler

    public SetHeaderHandler(HttpHandler next,
                            String header,
                            ExchangeAttribute value)

#### SetHeaderHandler

    public SetHeaderHandler(HttpHandler next,
                            String header,
                            String value)

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### getValue

    public ExchangeAttribute getValue()

#### getHeader

    public HttpString getHeader()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`