You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using curlrequest to fetch some remote files from a web server and save them locally (using curl's "output" option). If the response is a 404, it saves the 404 HTML page as the local file.
How can I do things like check the response before taking action? I'm seeing the process option but not sure how to use it. I tried this:
let options = {
...
process: res => {
console.log(res)
}
}
but that didn't seem to do anything. It says you pass a function. Not sure.
Is it possible to do what I want?
The text was updated successfully, but these errors were encountered:
I'm using curlrequest to fetch some remote files from a web server and save them locally (using curl's "output" option). If the response is a 404, it saves the 404 HTML page as the local file.
How can I do things like check the response before taking action? I'm seeing the
process
option but not sure how to use it. I tried this:but that didn't seem to do anything. It says you pass a function. Not sure.
Is it possible to do what I want?
The text was updated successfully, but these errors were encountered: