执行通过代理使用C ++ /升压一个简单的HTTP请求? [英] Perform a simple HTTP request using C++ / Boost via a proxy?

查看:187
本文介绍了执行通过代理使用C ++ /升压一个简单的HTTP请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与升压相当一个新手,我的冲浪虽然使用库代理是使用.NET的唯一的经验(这是真的很方便用于这一目的)。现在我试图执行通过HTTP代理服务器简单的HTTP请求。​​

I'm quite a newbie with Boost, and my only experience of surfing though a proxy using a library is using .NET (that is really convenient for that purpose). I'm now trying to perform a simple HTTP request through a HTTP proxy.

有一个整洁的方式,直接使用boost办呢?

Is there a tidy way to do it using boost directly?

我的代理使用NTLM认证方式。

My proxy use a NTLM authentification.

推荐答案

没有,升压既不提供HTTP客户端,也不符合代理接口的方式。你一定要自己实现这些功能。

No, Boost provides neither an HTTP client nor a way to interface with proxies. You would necessarily have to implement those features yourself.

需要明确的是,是的,这是可以实现使用Boost.Asio的HTTP客户端。但实现客户端,可以通过代理可靠地讲是显著更复杂,长耳不提供该超越低级插座本身的任何支持。这当然不包括用于执行NTLM身份验证的框架,这可能很难得到正确的。

To be clear, yes, it is possible to implement an HTTP client using Boost.Asio. But implementing a client that can reliably talk through a proxy is significantly more complex, and Asio does not provide any support for that beyond the low-level socket itself. It certainly does not include the framework for performing NTLM authentication, which may prove difficult to get right.

更复杂的库如卷曲提供支持。

More complex libraries like cURL provide that support.

这篇关于执行通过代理使用C ++ /升压一个简单的HTTP请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆