This url works fine when I try it in my browser:
https://username:[email protected]/api/Listings?$top=3
But when I run this code:
Promise<WS.Response> page = WS.url("https://username:[email protected]/api/Listings?$top=3").get();
I get this exception:
IllegalArgumentException: Illegal URL: https://username:[email protected]/api/Listings
I discovered that if I remove the colon from between username and password it doesn't throw an exception.
So I tried escaping the colon like this and got the same exception:
Promise<WS.Response> page = WS.url("https://username%[email protected]/api/Listings?$top=3").get();
How can I get around this issue?
I haven't tested, but it should work this way: