如何在Java中创建原始HTTP请求?
问题描述:
我想使用这些令牌发出基本的HTTP请求: http:/ /www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
I want to make a basic HTTP request using these tokens: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
我知道Java通常会为你做,但我想专门设置某些代币。
I know Java does it for you normally, but I want to specifically set certain tokens.
答
为什么重新发明轮子? Apache Http Client 4 符合rfc2616 。
Why reinvent the wheel ? The Apache Http Client 4 conforms to rfc2616.