-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings on httr::progress() #30
Comments
cc @hadley |
I have <r> packageVersion("curl")
[1] ‘0.9.9000’
<r> packageVersion("httr")
[1] ‘1.0.0’ |
This is a problem in the httr |
Could you test this fix:
|
looks to be fixed, testing a bit more |
yep, works for me |
Okay thanks for reporting. Closing this issue in favor of r-lib/httr#252. |
Doh :( |
Hi! I am trying to include a progress bar on a very long httr post request, but am not seeing anything appear until the request is completed. I tried installing with: devtools::install_github("hadley/httr") ...but the problem persists. Has this been fixed? Thanks. |
Can you include an example of what you are doing? |
Yes! library(httr) |
Let me know if you need anything else |
Can you try to construct an example that we can run as well (we don't have |
Hi, here you go. I made a very long list of addresses to replicate the dataset I am using. The trouble is that the 100% bar appears all at once, not over time. Also note that I am POSTing to and GETting from a local server; you could also call from datatsciencetoolkit.org but it seems that server is down right now, hopefully only briefly. Thank you very much. testme<-c( #getting the coordinates of all the addresses |
By default the progress bar tracks downloading, not uploading. I think what you want is:
|
Thank you! Now the progress bar does take some time to complete. I have noticed, though, that even after the bar gets from 0% to 5% to 100% (takes about 15 seconds for the request I'm making) it takes about 10 additional minutes before the console returns to '<'. (This is when I run the above code only through the "response3 <- POST(url,config=progress(type="up"), body=data2)" step.) Is this normal? Also, if this site isn't the best forum for a question like this, just let me know where would be more suitable (SO, etc.). Thank you again. |
I think you are confused because every request includes first an upload and then a download phase, but currently you can do a progress bar for only one or the other. So if you ask for an upload progress bar, the additional waiting time is probably the downloading of the response. Stack overflow would be better for this kind of questions. Do try to create a minimal reproducible example. For example: POST("http://httpbin.org/post", progress("up"), body = as.character(rnorm(1e5))) or library(nycflights13)
write.csv(flights, tmp <- tempfile())
POST("http://httpbin.org/post", progress("up"), body = upload_file(tmp)) |
Seems that
httr::progress()
now throws warnings when used on newhttr
1.0 version - e.g., a discussion here traitecoevo/taxonlookup#11 (comment)This is the warning message after using
progress()
The text was updated successfully, but these errors were encountered: