1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

35 commits

Author SHA1 Message Date
Bartek Iwańczuk
85c51404ae feat: Set user agent for http client (#2916) 2019-09-11 07:31:00 -04:00
Yoshiya Hinosawa
a205e8a3c2 fetch: implement bodyUsed (#2877) 2019-09-07 12:20:30 -04:00
Yoshiya Hinosawa
56508f113d ops/fetch: add statusText (#2851) 2019-09-02 12:30:14 -04:00
Bartek Iwańczuk
723284fd20
Use 'reqwest' to implement HTTP client (#2822)
Closes #2720
2019-08-30 14:49:03 -07:00
Yoshiya Hinosawa
9aa9aafbab fix: set response.url (#2782) 2019-08-16 18:20:04 -04:00
Long(Tony) Lian
1d0d54247c feat: fetch() now handles redirects (#2561) 2019-06-24 06:34:09 -07:00
Yoshiya Hinosawa
988bcbb884 fetch: make body async iterable (#2563) 2019-06-22 07:22:27 -07:00
Kurt Mackey
652be19041 use body when Request instance is passed to fetch (fixes #2433) (#2435) 2019-05-31 17:00:37 -04:00
Ryan Dahl
e4354ce739
Re-enable networking unit tests (#2268)
The following tests were commented out in order to get this to go green :
- bodyMultipartFormData
- bodyURLEncodedFormData
- fetchRequestInitStringBody
- netConcurrentAccept
- netListenAsyncIterator
2019-05-02 17:08:02 -04:00
Kurt Mackey
c05cbc8eac Add Request global constructor (#2253) 2019-05-01 23:56:42 -04:00
Ryan Dahl
9dfebbc949
Fix eslint warnings (#2151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
2019-04-21 16:40:10 -04:00
Ryan Dahl
c42a9d7370
Upgrade deno_std (#1892)
A major API change was that asserts are imported from testing/asserts.ts
now rather than testing/mod.ts and assertEqual as renamed to
assertEquals to conform to what is most common in JavaScript.
2019-03-06 20:48:46 -05:00
Kitson Kelly
a21a5ad2fa Add Deno global namespace (#1748)
Resolves #1705

This PR adds the Deno APIs as a global namespace named `Deno`. For backwards
compatibility, the ability to `import * from "deno"` is preserved. I have tried
to convert every test and internal code the references the module to use the
namespace instead, but because I didn't break compatibility I am not sure.

On the REPL, `deno` no longer exists, replaced only with `Deno` to align with
the regular runtime.

The runtime type library includes both the namespace and module. This means it
duplicates the whole type information. When we remove the functionality from the
runtime, it will be a one line change to the library generator to remove the
module definition from the type library.

I marked a `TODO` in a couple places where to remove the `"deno"` module, but
there are additional places I know I didn't mark.
2019-02-12 10:08:56 -05:00
Yoshiya Hinosawa
77114fbda4 chore: update license lines (#1557) 2019-01-21 13:03:30 -06:00
Ryan Dahl
d787713908 Revert "fix: fix fetch tests (#1535)"
This reverts commit dd08165528.

These tests are still flaky:
https://travis-ci.com/denoland/deno/jobs/171240240
https://travis-ci.com/denoland/deno/jobs/170775382
2019-01-17 17:33:50 -05:00
Yoshiya Hinosawa
dd08165528 fix: fix fetch tests (#1535) 2019-01-16 01:18:01 -05:00
Kevin (Kun) "Kassimo" Qian
8d452d74fa Support more fetch init body types (#1449) 2019-01-03 06:41:20 -05:00
Ryan Dahl
6cc998f28b
Remove support for extensionless import (#1396) 2018-12-23 11:44:08 -05:00
Kevin (Kun) "Kassimo" Qian
cbee2895b3 Implement Body.formData for fetch (#1393) 2018-12-21 17:09:53 -05:00
Kevin (Kun) "Kassimo" Qian
e4be1209b6 Avoid fetch segfault on empty Uri (#1394) 2018-12-21 04:47:09 -05:00
Ryan Dahl
a25497fb66 Disable flaky fetch tests. 2018-11-27 11:33:23 -08:00
Ryan Dahl
eaec5a8780 Support uploading data from fetch()
Does not yet support streaming, only strings and TypedArrays for now.
2018-11-16 11:44:25 +08:00
Ryan Dahl
3c8d2bde68
Support request method and headers in fetch() (#1188)
Adds a general HttpHeader flatbuffer message for serializing requests
and responses.
2018-11-14 17:36:34 -08:00
Ryan Dahl
6446bc5328 Move fetch headers into its own file. 2018-11-02 20:50:01 -07:00
Kitson Kelly
c0492ef061 Make Headers more idiomatic (#1062) 2018-10-23 04:43:43 -07:00
ztplz
c4bddc4651 Implemente clone for FetchResponse (#1054) 2018-10-21 14:42:18 -07:00
ztplz
7210e7b33b Make fetch header compliant with the current spec (#1019) 2018-10-19 12:12:36 -04:00
Ryan Dahl
cec82263c1 Format 2018-09-30 16:35:12 -04:00
ztplz
b635553fd7 Improve fetch headers (#853) 2018-09-30 10:31:50 -04:00
Parsa Ghadimi
4b1eb855bf Make fetch.blob() work 2018-09-14 12:50:32 -07:00
qti3e
41c70b154f Add support for fetch() headers (#727) 2018-09-12 15:16:42 -04:00
Ryan Dahl
8090fb252b Expose deno.ErrorKind
Originally we planned to have a JS class for each error code. But it
seems better to just have a single DenoError class with a "kind"
property. One nice thing about using an enum instead of classes for
errors is that switch() can be used during error handling instead of a
bunch of instanceof branches.
2018-09-09 23:12:22 -04:00
Parsa Ghadimi
1052f8d0c9 Check allow-net in fetch 2018-09-06 11:07:10 -04:00
ShinDarth
bbc4e55bda Minor code refactoring 2018-09-01 21:59:52 -04:00
Ryan Dahl
2dd9a8d028 Reorganize js/unit_tests.ts 2018-08-30 14:41:55 -04:00