Hello everyone,
I’m trying to make a POST call with ResTemplate in java.
The parameters have already been checked and are ok, i think i am wrong to use the ResTemplate.
String body = “?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559”;
String code = encode(API_KEY,body);
logger.info("START -- code ", code );
body += "&signature="+code;
HttpEntity entity = new HttpEntity(body,headers);
ResponseEntity<String> response =
restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<>() {
});
I receive this error:
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401
Someone can help me?
Thanks