The @RequestHeader annotation allows you to inject one or more HTTP headers into method parameters. This is done by annotating one or more method parameters with @RequestHeader:
Host localhost:8080
Accept text/html,application/
xhtml+xml,application/xml;q=0.9
Accept-Language fr,en-gb;q=0.7,en;q=0.3
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
@GetMapping("/form")
public String setupForm(@RequestHeader("Keep-Alive") long
keepAlive) {
// keepAlive will get the value 300
}