node.js http client 如何发送任意头

2014-04-25 20:56:48 +08:00
 1423
想做个模拟登陆,用 Fiddler 抓取,Raw 中有以下
```
POST http://example.com HTTP/1.1
Accept: */*
Content-Type: text/plain
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: example.com
Content-Length: xxx
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

callCount=1
page=/xxx/xxx/main.jsp
httpSessionId=
scriptSessionId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
c0-scriptName=dwrMonitor
c0-methodName=getFrmtipsByuserId
c0-id=0
batchId=0

```

想知道 Cookie 以下的内容如何发送?
3272 次点击
所在节点    Node.js
7 条回复
pubby
2014-04-25 21:43:29 +08:00
Cookie以下的是POST内容吧
1423
2014-04-25 22:10:17 +08:00
@pubby 我傻了。。抱歉。。
julyclyde
2014-04-26 20:52:13 +08:00
@pubby POST内容为什么不是&连接起来的?这风格好诡异啊
pubby
2014-04-26 23:40:14 +08:00
@julyclyde 抓包软件的问题吧
1423
2014-04-27 00:52:21 +08:00
@julyclyde
@pubby
求你们不要回复了。
问这样的问题。。好丢人。
manoon
2014-05-01 17:48:39 +08:00
楼主好可爱~~~
zonghua
2015-07-23 13:40:37 +08:00
GBK问题你们是怎么解决的?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/110064

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX