RVG
RVG

Reputation: 3576

How to set header on get method - android rest api

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

Answers (1)

RVG
RVG

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

Related Questions