Which annotation is used to bind the value of a method parameter to a named HTTP header in a Spring Boot application?

  • @RequestHeader
  • @HeaderParam
  • @HttpHeader
  • @HeaderRequest
The @RequestHeader annotation is used to bind the value of a method parameter to a named HTTP header in a Spring Boot application. By specifying the header name as a parameter to this annotation, you can access the value of the corresponding HTTP header. The other options are not valid annotations for binding HTTP headers in Spring Boot.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *