libcurl的(Linux操作系统,C) - 有一个内置的方式来POST / PUT gzip压缩的请求? [英] libcurl (linux, C) - Is there a built-in way to POST/PUT a gzipped request?

查看:847
本文介绍了libcurl的(Linux操作系统,C) - 有一个内置的方式来POST / PUT gzip压缩的请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要执行该请求使用GZIP是COM pressed一个HTTP POST和/或PUT(使用libcurl的)。我一直没能找到libcurl中这方面的任何原生支持,如果我只是还没有找到正确的文档,或者如果真的有这种不支持想知道? (即我必须实现我自己的包装为gzip请求主体?)

I want to perform a HTTP POST and/or PUT (using libcurl) with the request being compressed using GZIP. I haven't been able to find any native support for this in libcurl, and am wondering if I just haven't found the correct documentation or if there really is no support for this? (ie. Will I have to implement my own wrapper to gzip the request body?)

推荐答案

HTTP没有自动或协商COM $ P $的请求pssion,你需要自己做他们明确地发送数据之前。

HTTP has no "automatic" or negotiated compression for requests, you need to do them explicitly by yourself before sending the data.

另外,我不同意阿迪亚谁提供了另一种答案(判断我的偏见它并不奇怪),但会说的libcurl是最好的选项供您做C(或C ++或其他语言)的HTTP请求会在一个...

Also, I disagree with Aditya who provided another answer (judging my bias it's not that strange) but would say that libcurl is one of the best possible options for you to do HTTP requests with C (or C++, or other languages) ...

这篇关于libcurl的(Linux操作系统,C) - 有一个内置的方式来POST / PUT gzip压缩的请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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