Reputation: 3576
I've used Rest api using resty.jar in my application
i get from http://beders.github.io/Resty/Resty/Examples.html
Here, get and post method are working well.
But i don't know how to add header in get method.
How to achieve this?
Upvotes: 1
Views: 888
Reputation: 3576
i've found the solution.
need to add
r.withHeader("key", "value);
before get json response
Object name = r.json("http://ws.geonames.org/postalCode");
Upvotes: 3