使用Databinders调度库在Scala中设置用户代理标题 [英] Setting User-Agent Header in Scala with Databinders Dispatch Library

查看:79
本文介绍了使用Databinders调度库在Scala中设置用户代理标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道该怎么做吗?

Does anyone know how to do this?

推荐答案

您需要使用<:<操作员.像这样:

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)") 

这篇关于使用Databinders调度库在Scala中设置用户代理标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆