change calls from RCurl to curl package
@infotroph tried my best to update convert.input file.although I am not at all sure that form_file would be an ideal function to replace POSTFORM function. hhtr::POST might be the ideal choice as you said.
Input requested: This PR will alter PEcAn.utils::download.url by replacing the call to RCurl::url.exists with a header request performed via curl::curl_fetch_memory, but these behave differently in cases where the host isn't resolvable: url.exists returns FALSE, curl throws an error.
paging @robkooper as architect and @serbinsh as user with an ongoing troublesome retry-the-URL use case: Does download.url need to handle temporary DNS failures, or is it strictly intended to wait for an otherwise-accessible host who is taking a while to prepare a particular file?
[comment edited: Tagged the wrong Kooper.]
out<-RCurl::curlPerform(url = "https://SDMDataAccess.nrcs.usda.gov/Tabular/SDMTabularService.asmx", httpheader = headerFields, postfields = body, writefunction = reader$update
@infotroph cant really figure out the transformation for this part. can you once explain these arguments (httpheader, writefunction, postfields)?
Similar to comments on other PRs, was curious what's left to do on this one @moki1202 @infotroph
@mdietze @moki1202
-
I tested this locally and discovered I gave some bad advice in the comments above, so I'm fixing in a local branch and will push ASAP.
-
Branch
moki1202/patch-8has been deleted and getting it back will be a hassle, so I'll open a replacement PR and close this one once it's open.
@mdietze @moki1202
- I tested this locally and discovered I gave some bad advice in the comments above, so I'm fixing in a local branch and will push ASAP.
- Branch
moki1202/patch-8has been deleted and getting it back will be a hassle, so I'll open a replacement PR and close this one once it's open.
@infotroph Apologies from my side. Don't know why I deleted this branch. Might have been early days. Let me know how I can help to complete this.
Continuing work on this in PR #2944; closing this one