feat: implement net module with NetworkService (#19094)
* Stub class for NetworkService-based URLRequest * Create SimpleURLLoader * Implement downloading * Implement response event * Only write data afte previous one finished * Use DataPipeGetter for uploading data * Support chunked upload data * Call size callback at last * Simplify UploadDataPipeGetter * Implement cancelling and closing * Handle redirection * Fix uploading large data * Emit error when request fails * Emit error for redirection error * Simplify emitting error * "follow" should also emit "redirect" event * SetLoadFlags is not really used * Implement GetUploadProgress * Implement FollowRedirect * Fix exception with multiple redirections * Reduce number of EmitEvent methods * Emit response errors * FetchRedirectMode => RedirectMode
This commit is contained in:
parent
4b674c1daf
commit
2a3793485f
5 changed files with 708 additions and 5 deletions
|
@ -25,7 +25,6 @@ class AtomURLRequest;
|
|||
|
||||
namespace api {
|
||||
|
||||
//
|
||||
// The URLRequest class implements the V8 binding between the JavaScript API
|
||||
// and Chromium native net library. It is responsible for handling HTTP/HTTPS
|
||||
// requests.
|
||||
|
@ -114,7 +113,7 @@ class URLRequest : public mate::EventEmitter<URLRequest> {
|
|||
mate::Dictionary GetUploadProgress(v8::Isolate* isolate);
|
||||
|
||||
protected:
|
||||
explicit URLRequest(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||
URLRequest(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
|
||||
~URLRequest() override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue