I'm sending request using URIBuilder
and I want to print the POST request by without or masking some of the parameters, code:
uriBuilder.addParameter("p1", "v1");
....
uriBuilder.addParameter("p10", "v10");
HttpPost post = new HttpPost(uriBuilder.build());
httpClient.execute(target, post);
I get NullPointerException
when tried post.getEntity()
Using uriBuilder.getQueryParams()
seems as not intuitive approach
uriBuilder.getQueryParams().stream().forEach(p->
logger.debug(p.getName()+"=" +p.getValue()+"&"));
What is the best way to print request in such case?
I want to mask some of the parameters (sensitive data)