Commit graph

20 commits

Author SHA1 Message Date
Jeremy Rose
872d1fe05a
feat: implement net.fetch (#36733) 2023-02-20 12:57:38 -08:00
Jeremy Rose
8f23b1527b
fix: use chrome headers in net.request for everything except cookie (#36666) 2022-12-21 14:53:29 -08:00
Milan Burda
2091343b78
refactor: initialize member variables directly (#34046) 2022-05-04 16:30:05 +02:00
David Sanders
1e8da899a3
chore: fix typos (#32985) 2022-02-21 10:27:45 +01:00
Matthew Rayermann
d26d337bb8
feat: add rawHeaders to IncomingMessage (#31853)
* Add response.rawHeaders to docs for IncomingMessage

* Remove trailing spaces

* Implement raw headers, add tests

* Fix lint issues

* Add example from NodeJS docs

* Fix lint issue in doc example

* Add missing #
2022-01-24 11:46:15 -05:00
Samuel Attard
b8c2481edb
fix: do not handle write errors after request is aborted (#28682)
This fixes a flake on linux CI which started recently where the "write"
promise is being rejected after the request has been aborted /
cancelled.  In this case we should drop the error to the floor but
instead we pass it down the stack where it eventually emits a now
unhandled error event.

Example failure: https://app.circleci.com/pipelines/github/electron/electron/38072/workflows/c1faf19b-aa41-4f99-a564-165729222859/jobs/838813

Verified fix by running the test that caused it 10000 times before fix
and 10000 times after.  ~50 failures before, 0 after.
2021-04-19 09:50:14 -04:00
Emil Pettersson
a9b25dda85
fix: race-condition in electron.net (#27898) 2021-02-26 13:18:46 -08:00
LuoJinghua
e1cc78f275
feat: allow setting the Origin header and Sec-Fetch-* headers in net.request() (#26135) 2020-11-17 14:25:41 -08:00
Milan Burda
df1432a315
feat: add net.online / net.isOnline() (#21004) 2020-10-20 19:55:06 -07:00
Keeley Hammond
6356cd4018
fix: allow ClientRequest responses to be throttled (#25531)
* fix: allow net streams to be throttled [WIP]

* fix: handle resume throttling within IncomingMessage [WIP]

* fix: fix urlLoader typing, add throttle test

* fix: fix lint and increase test timeout for Linux

* fix: increase test chunk limit to 20 and timeout to 2000

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2020-10-06 09:47:41 +09:00
Jeremy Rose
0e7d59dd79
feat: [net] add "credentials" option to net.request (#25284)
* feat: [net] add "credentials" option to net.request

* remove debugging log

* add tests
2020-09-29 12:03:33 -04:00
Shelley Vohr
77038b7bda
chore: upgrade to Node.js v14.9.0 (#25249) 2020-09-17 16:08:57 -06:00
Samuel Attard
b02748e607
build: ensure that electron/lib/browser can only use browser or common imports (#24512)
* build: ensure that electron/lib/browser can only use browser or common imports

* chore: fix linting
2020-07-13 09:58:49 -07:00
Jeremy Rose
1719f073c1
chore: remove some unused code in the net module (#24488) 2020-07-13 09:36:20 -07:00
Samuel Attard
eb6616e4e9
build: update to standard 14 (#24479) 2020-07-09 10:18:49 -07:00
Samuel Attard
ad16e6c647
build: update linting deps (#24461) 2020-07-08 21:19:49 -07:00
Shelley Vohr
659e79fc08
refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
2020-06-22 20:32:45 -07:00
LuoJinghua
9d851b8791
net: Don't ignore the referer header in net.request (#23386) 2020-05-20 13:28:38 -04:00
Jeremy Apthorp
de44d28c8e
refactor: ginify Session (#23569) 2020-05-19 10:18:12 -07:00
Jeremy Apthorp
7e841ceb5c
refactor: tsify net module (#23618) 2020-05-18 10:22:48 -07:00
Renamed from lib/browser/api/net.js (Browse further)