0

Can anyone please tell me that how we use Referer Header in android. As i am working on tool to check for vulnerable code and as using Referer header in an application is not safe so can please anyone tell me syntax for that in android..specifically.

g00dy
  • 6,752
  • 2
  • 30
  • 43
user2223987
  • 91
  • 1
  • 6
  • Possible duplicate of - http://stackoverflow.com/questions/9903496/how-to-send-a-url-request-as-referer?rq=1 – sjain Jul 03 '13 at 09:44

1 Answers1

0

With HttpGet, HttpPost you can edit the request headers:

HttpGet request = new HttpGet("http://your.url.com");
request.addHeader("Referer", "http://referer.url.com");
HttpResponse response = new DefaultHttpClient().execute(request);
Jong
  • 9,045
  • 3
  • 34
  • 66