简体   繁体   中英

How do I make a raw HTTP request in Java?

I want to make a basic HTTP request using these tokens: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html

I know Java does it for you normally, but I want to specifically set certain tokens.

Why reinvent the wheel ? The Apache Http Client 4 conforms to rfc2616 .

在要连接的主机上打开到端口80的套接字,然后以与写入文件或控制台相同的方式写入流。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM