Skip to main content

Request Headers

Learn Request Headers (Request Handling, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Request headers are name-value pairs the client sends before the body, such as Accept , Content-Type , Authorization and User-Agent ; they describe the client and the request. Reading them in Spring MVC: use @RequestHeader , a HttpHeaders parameter, RequestEntity or HttpServletRequest.getHeader() . Case-insensitive : content-type and Content-Type are the same header, and Spring treats them so.

More lessons in Request Handling