I have build a rest api with spring security. I'm getting the 401 errors in the nginx logs. Now I want to intercept and trace the username, password, request body and URL before the authentication when i send a post request via rest client. I'm able to get the url as String url = httpRequest.getRequestURL().toString(); Could any one please let me know how can i get the username, password and request body from HttpServletRequest.
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Laravel 5.1 MethodNotAllowedHttpException on store
- Can I parameterize labels and properties on CREATE
相关文章
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Global Exception Handling in Jersey & Spring?
- REST search interface and the idempotency of GET
- Getting error detail from WCF REST
- Send a GET request with a body in JavaScript (XMLH
- GuzzleHttp Hangs When Using Localhost
- JAX-RS (Jersey) ExceptionMapper - @Context injecti
Below code worked for me to get the username and password from the httpRequest for the information sent from the rest client.