开发者

Pass POST data via raw HTTP

开发者 https://www.devze.com 2023-04-08 14:44 出处:网络
For testing purposes, I need to send some raw POST data to a page I set up on my web server. The page is working fine. I have tested sending data to via another web page as well as a C# application. H

For testing purposes, I need to send some raw POST data to a page I set up on my web server. The page is working fine. I have tested sending data to via another web page as well as a C# application. However, I want to try passing raw HTTP data to it as well.

How can I do that? What client will enable me to do that? I'm looking to pass data to the page in the following form:

    POST /login.jsp HTTP/1.1
    Host: www.mysite.com
    User-Agent: Mozilla/4.0
    Cont开发者_高级运维ent-Length: 27
    Content-Type: application/x-www-form-urlencoded

    userid=joe&password=guessme


If you want it real raw, use telnet. If you want something more high-level — you can use curl.


You could use a Javascript Ajax library, both jQuery and Prototype JS allow you to easily modify headers and Post data.

0

精彩评论

暂无评论...
验证码 换一张
取 消