Does anyone know how to do this?
Asked
Active
Viewed 2,616 times
3 Answers
15
You need to append your request with the header info, using the <:< operator. Like this :
url("http://example.com") <:< Map("User-Agent" -> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)")

ACyclic
- 5,904
- 6
- 26
- 28
3
Just from reading the source, it looks like you're supposed to call http.client.params.setParameter("User-Agent","Cowbells") on your Http object. Have you tried this?

Mitch Blevins
- 13,186
- 3
- 44
- 32
2
This will work as well:
url("http://example.com").addHeader("User-Agent", "Mozilla...")

mikebridge
- 4,209
- 2
- 40
- 50