Closed kbilev closed 3 years ago
Hello @kev912002 ,
Thanks for raising this issue! The root cause is with encoding the plus sign. I can fix it directly in the client, but this could break some other cases, and I believe, it's a bit against HTML URL Encoding standards.
More preferable solution is just use space symbol as separator:
MailjetRequest mailjetRequestDesc = new MailjetRequest(Message.resource)
.filter("Sort", "id DESC");
I'll add tests and update the docs.
The API docs should be updated, they are misleading with the +DESC
Hello, using the filter to Sort descending does not work and gives an error message.
request = new MailjetRequest(Message.resource).filter("Sort", "id+DESC");
response = client.get(request);
Error Message:
com.mailjet.client.errors.MailjetClientRequestException: { "ErrorInfo" : "", "ErrorMessage" : "Unexpected error during GET: Invalid sort specification: Cannot sort on field id+desc", "StatusCode" : 400 }
It seems that an similar problem existed in the Python API: https://github.com/mailjet/mailjet-apiv3-python/issues/46