slowman
V2EX  ›  Node.js

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

  •  
  •   slowman · Apr 25, 2014 · 3993 views
    This topic created in 4463 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
        1
    pubby  
       Apr 25, 2014
    Cookie以下的是POST内容吧
    slowman
        2
    slowman  
    OP
       Apr 25, 2014
    @pubby 我傻了。。抱歉。。
    julyclyde
        3
    julyclyde  
       Apr 26, 2014
    @pubby POST内容为什么不是&连接起来的?这风格好诡异啊
    pubby
        4
    pubby  
       Apr 26, 2014 via Android
    @julyclyde 抓包软件的问题吧
    slowman
        5
    slowman  
    OP
       Apr 27, 2014
    @julyclyde
    @pubby
    求你们不要回复了。
    问这样的问题。。好丢人。
    manoon
        6
    manoon  
       May 1, 2014
    楼主好可爱~~~
    zonghua
        7
    zonghua  
       Jul 23, 2015
    GBK问题你们是怎么解决的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3135 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:36 · PVG 20:36 · LAX 05:36 · JFK 08:36
    ♥ Do have faith in what you're doing.