开发者

How to send HTTP GET request to proxy with Android

开发者 https://www.devze.com 2023-03-16 03:47 出处:网络
I need to send GET request to proxy, with custom headers and then read response? ex: GET http://www.google.com/ HTTP/1.1

I need to send GET request to proxy, with custom headers and then read response?

ex:

GET http://www.google.com/ HTTP/1.1 Accept-Language: en-US

User-Agent: Mozilla/4.0

Accept-Encoding: gzip, deflate

Host: www.google.com

Connection: Keep-Alive

Some-field: sdasdas

H开发者_运维技巧ow to sent such request to somesite.com:sopeport ?

Thank you


This is exactly what you need and check this for sample usage. I know that the last one's for J2SE, but they should support the same interface.

0

精彩评论

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