本文介绍了httr和Accept-Encoding:gzip,deflate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在R中进行以下通话:

I want to do the following call in R:

curl "http://www.openml.org/api/v1/task/list/limit/3000?api_key=c1994bdb7ecb3c6f3c8f3b35f4b47f1f" -H "Accept-Encoding: gzip, deflate"

上面的行返回一个gzip压缩字符串.但是,当我使用httr R-package时,似乎会忽略"Accept-Encoding:gzip,deflate":

The line above returns a gzip compressed string. But when I use the httr R-package it seems that "Accept-Encoding: gzip, deflate" is ignored:

library(httr)
content = GET(url = "http://www.openml.org/api/v1/task/list/limit/3000?api_key=c1994bdb7ecb3c6f3c8f3b35f4b47f1f", add_headers(`Accept-Encoding` = "gzip, deflate"))

推荐答案

已讨论并解决了此问题在GitHub上:

This issue was discussed and resolved on GitHub:

这篇关于httr和Accept-Encoding:gzip,deflate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 21:24