List of usage examples for javax.servlet.http HttpServletRequest toString
public String toString()
From source file:uk.ac.ebi.phenotype.web.controller.GenesController.java
/** * Prints out the request object//from w ww .j a v a2 s.c o m */ @RequestMapping("/genes/print-request") public ResponseEntity<String> printRequest(HttpServletRequest request) { Enumeration<String> s = request.getHeaderNames(); while (s.hasMoreElements()) { String header = (String) s.nextElement(); Enumeration<String> headers = request.getHeaders(header); while (headers.hasMoreElements()) { String actualHeader = (String) headers.nextElement(); } } HttpHeaders resp = new HttpHeaders(); resp.setContentType(MediaType.APPLICATION_JSON); return new ResponseEntity<String>(request.toString(), resp, HttpStatus.CREATED); }