pecan icon indicating copy to clipboard operation
pecan copied to clipboard

change calls from RCurl to curl package

Open moki1202 opened this issue 4 years ago • 6 comments

moki1202 avatar Mar 14 '21 07:03 moki1202

@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.

moki1202 avatar Mar 14 '21 07:03 moki1202

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.]

infotroph avatar Mar 20 '21 08:03 infotroph

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)?

moki1202 avatar Mar 21 '21 16:03 moki1202

Similar to comments on other PRs, was curious what's left to do on this one @moki1202 @infotroph

mdietze avatar Mar 24 '22 19:03 mdietze

@mdietze @moki1202

  1. 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.

  2. Branch moki1202/patch-8 has 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 avatar Mar 25 '22 09:03 infotroph

@mdietze @moki1202

  1. 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.
  2. Branch moki1202/patch-8 has 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.

moki1202 avatar Mar 25 '22 10:03 moki1202

Continuing work on this in PR #2944; closing this one

infotroph avatar Aug 25 '22 04:08 infotroph