ServiceStack.Java Wrong date format for GET requests

Hello,

I have a few GET requests that takes a date as a parameter (e.g.: give me all records before date X) however the Java client generate a URL with a date format that cannot be interpreted by the host. I was able to workaround a similar issue with GUIDs by treating them as Strings but I cannot do this for dates.

Is it possible to send a date in a GET request in a format that can be understood by the host?

I included my request and the generated URL below.

/api/json/reply/MyGetRequest?expiryDate=Wed+Nov+11+14%3A54%3A05+EST+2015
    public class MyGetRequest : IReturn<Token>
    {
        public DateTime ExpiryDate { get; set; }
    }

Can you submit this as an issue to: https://github.com/ServiceStack/ServiceStack.Java/issues

FYI, won’t be able to get to this myself until next week, but if you file an issue @layoric maybe able to get to it sooner.

Ok I will open an issue.

In the meantime you should be able to construct and pass in a custom querystring, e.g:

Response r = client.get("/api/json/reply/MyGetRequest?expiryDate=2015-11-14", Response.class);

Thanks.

I opened 2 issues: one for Java and the other for Swift.

The client and android Java libraries have been update to 1.0.20 with @NoWoL s suggested date parsing fix. 1.0.20 is now available from JCenter and Maven Central.