1

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?

RVG
  • 3,538
  • 4
  • 37
  • 64

1 Answers1

3

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");
RVG
  • 3,538
  • 4
  • 37
  • 64