mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 14:00:01 -04:00
fix error handling, allow building an es6 module
This commit is contained in:
parent
e4c064401e
commit
bb31ef120f
4 changed files with 26 additions and 4 deletions
|
@ -96,6 +96,7 @@ class Headers {
|
|||
}
|
||||
}
|
||||
this[prop] = value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,6 +215,7 @@ function libcurl_fetch(url, params={}) {
|
|||
let finish_callback = (error, response_info) => {
|
||||
if (error != 0) {
|
||||
reject("libcurl.js encountered an error: " + error);
|
||||
return;
|
||||
}
|
||||
let response_data = merge_arrays(chunks);
|
||||
let response_obj = create_response(response_data, response_info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue