Comments (4)
FTP is not officially supported by httr2, sorry.
from httr.
That is fair enough. However, note that my issue is reported under httr
and not httr2
. Furthermore, the error message is cryptic (I've recreated the reprex with the reprex
package to make this more clear). A more informative error-message would be helpful here.
library(httr)
# ftp site obtained from https://dlptest.com/ftp-test/
ftp_list <-
GET("ftp://ftp.dlptest.com/",
authenticate("dlpuser", "rNrKYTX9g7z3RgJRmxWuGHbeu"),
dirlistonly = TRUE)
## this doesn't work and throws an error:
content(ftp_list)
#> Error in x$headers[["Content-Type"]]: subscript out of bounds
## this does work:
cat(rawToChar(ftp_list$content))
#> drwxr-xr-x 3 1001 1001 16 Nov 01 19:42 11
#> -rw-r--r-- 1 1001 1001 37032115 Nov 01 19:45 CGR_WAV_102023.wav
#> -rw-r--r-- 1 1001 1001 718 Nov 01 19:40 Export_PostVenta_64552.csv
#> -rw-r--r-- 1 1001 1001 1492 Nov 01 19:40 Export_PostVenta_64553.csv
#> -rw-r--r-- 1 1001 1001 878 Nov 01 19:44 Export_PostVenta_64612.csv
#> -rw-r--r-- 1 1001 1001 1169 Nov 01 19:44 Export_PostVenta_64613.csv
#> -rw-r--r-- 1 1001 1001 27781 Nov 01 19:40 Export_PostVenta_64711.csv
#> -rw-r--r-- 1 1001 1001 187 Nov 01 19:40 Export_PostVenta_64712.csv
#> -rw-r--r-- 1 1001 1001 168 Nov 01 19:40 Export_PostVenta_64713.csv
#> -rw-r--r-- 1 1001 1001 345 Nov 01 19:44 Export_PostVenta_64714.csv
#> -rw-r--r-- 1 1001 1001 178 Nov 01 19:44 Export_PostVenta_64715.csv
#> -rw-r--r-- 1 1001 1001 10485760 Nov 01 19:44 NetAllyTest.txt
#> -rw-r--r-- 1 1001 1001 1149 Nov 01 19:43 TestUpload.kml
#> drwxr-xr-x 3 1001 1001 18 Nov 01 19:40 Vorne
#> -rw-r--r-- 1 1001 1001 593920 Nov 01 19:41 \conexao.sdf
#> -rw-r--r-- 1 1001 1001 10000 Nov 01 19:45 _11471977
#> drwxr-xr-x 2 1001 1001 29 Nov 01 19:40 input
#> -rw-r--r-- 1 1001 1001 6895 Nov 01 19:43 test-cron-2023-11-01.xlsx
#> -rw-r--r-- 1 1001 1001 144 Nov 01 19:40 test.zip
Created on 2023-11-01 with reprex v2.0.2
from httr.
That was a typo; it's not supported by httr either. I agree that the error message could be better but (a) httr is no longer under active development and (b) I don't think many people would expect ftp to work with a package called httr.
from httr.
OK. Fair enough. Thanks for considering.
from httr.
Related Issues (20)
- more docs on creating a complex request body HOT 1
- Add mime type qs::qread() to httr::content() HOT 1
- lexical error: invalid char in json text. HOT 1
- GET request with an empty header HOT 1
- Vectorise functions HOT 1
- OAuth callback url is encoded while it shouldn't.
- R CMD check failure on musl-based systems HOT 1
- Release httr 1.4.5
- is.character(headers) is not TRUE HOT 1
- httr & use_proxy vs RCurl behaviour difference HOT 1
- Forbidden with httr, but works with py requests HOT 7
- Release httr 1.4.6
- Make file upload seekable
- Release httr 1.4.7
- Use httpbin mirror
- modify_url() cannot handle API versioning HOT 1
- httr 1.4.7: Option seekfunction (20167) has unknown or unsupported type HOT 4
- Upkeep for httr (2023)
- Bug: Executing `http::GET()` in parallel results in an error when no single core GET request was issued before. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httr.