You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
was trying to do a PUT request (following the testTheSimplestGetRequest() example in the escher-java/src/test/java/com/emarsys/escher/acceptance/AcceptanceTests.java file).
My Test method looks as follows:
@Test
public void testTheSimplestPutRequest() throws Exception {
HttpRequestBase put = new HttpPut("https://xyz:443/api/api-services/");
String body = "String test body";
put = client.signPutRequest(put, body);
String response = client.sendRequest(put);
}
i have also modified the signRequest() to now accept a body like so:
public HttpRequestBase signPutRequest(HttpRequestBase request, String body) throws EscherException {
EscherRequestClientImpl escherRequest = new EscherRequestClientImpl(request, body);
escher.signRequest(escherRequest, ESCHER_ACCESS_KEY_ID, ESCHER_SECRET, new ArrayList<>());
return escherRequest.getHttpRequest();
}
This returns the following error:
{"message":"HTTP Status 401 - verification failed for axbbc-9459-4798-a6cb-sddff: The signatures do not match (provided: xbxbxbxbx, calculated: fbfbfbf). path: api/api-services","errors":{}}
version: 0.3.1
Any ideas or any example on how to sign a PUT or POST request ?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
was trying to do a PUT request (following the testTheSimplestGetRequest() example in the escher-java/src/test/java/com/emarsys/escher/acceptance/AcceptanceTests.java file).
My Test method looks as follows:
i have also modified the signRequest() to now accept a body like so:
This returns the following error:
{"message":"HTTP Status 401 - verification failed for axbbc-9459-4798-a6cb-sddff: The signatures do not match (provided: xbxbxbxbx, calculated: fbfbfbf). path: api/api-services","errors":{}}
version: 0.3.1
Any ideas or any example on how to sign a PUT or POST request ?
Thanks
The text was updated successfully, but these errors were encountered: