slowman
V2EX  ›  Node.js

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

  •  
  •   slowman · Apr 25, 2014 · 4200 views
    This topic created in 4580 days ago, the information mentioned may be changed or developed.
    想做个模拟登陆,用 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 以下的内容如何发送?
    7 replies  •  2015-07-23 13:40:37 +08:00
    pubby
    pubby
    Apr 25, 2014
    1
    Cookie以下的是POST内容吧
    slowman
    slowman
    OP
    Apr 25, 2014
    2
    @pubby 我傻了。。抱歉。。
    julyclyde
    julyclyde
    Apr 26, 2014
    3
    @pubby POST内容为什么不是&连接起来的?这风格好诡异啊
    pubby
    pubby
    Apr 26, 2014 via Android
    4
    @julyclyde 抓包软件的问题吧
    slowman
    slowman
    OP
    Apr 27, 2014
    5
    @julyclyde
    @pubby
    求你们不要回复了。
    问这样的问题。。好丢人。
    manoon
    manoon
    May 1, 2014
    6
    楼主好可爱~~~
    zonghua
    zonghua
    Jul 23, 2015
    7
    GBK问题你们是怎么解决的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2662 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 10:39 · PVG 18:39 · LAX 02:39 · JFK 05:39
    ♥ Do have faith in what you're doing.