Sephy
Sephy

Reputation: 50392

User Agent in http client Android

I building an Https Client to send some data to a server, but I don't know what to pass in User-Agent. Should I use the webkit one's or do I have to build one explicitely for my App? I'm using this handy post Thanks for any help

Upvotes: 1

Views: 5981

Answers (2)

Christopher Orr
Christopher Orr

Reputation: 111555

You don't need to pass any User-Agent header, unless you're using a service that explicitly requires it such as for tracking or debugging purposes etc.

HTTP works perfectly well without the User-Agent header being present.

Upvotes: 7

fazo
fazo

Reputation: 1827

you can send: "Mozilla/5.0 (Linux; U; Android 1.0; en-us; generic) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2" that's emulator user agent string

Upvotes: 0

Related Questions