aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/fetch.test.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-22Fix flaky request.signal implementationGravatar Jarred Sumner 1-15/+53
2023-02-22Make the tests runGravatar Jarred Sumner 1-160/+128
2023-02-22feat(Request.signal) Initial support for signal in Request + fetch and ↵Gravatar Ciro Spaciari 1-74/+323
Request + Bun.serve (#2097) * add fetch abort signal * get aborted (still segfaults) * bidings.zig u0 error * still GC/memory error * fix start crash * fix AbortSignal fromJS * change fromJS to obj.as * addAbortSignalEventListenner * handle abort types, and add tests * fix tests * add custom reason test * merge 2 substring methods, use MAKE_STATIC_STRING_IMPL * fix create AbortError and TimeoutError, move globalThis and exception creation to main thread * fix tests and rebuild headers * no need to check with substring reason is already an exception * no need to check with substring reason is already an exception * fix dumb error inverting conditions for check reason * fix custom reason behavior * Request signal * remove package-lock.json * Remove JSC.Strong from Request signal * fix globals for fetch abort signal * more tests, clone signal crashs * fix AbortSignal.toJS * fix toJS bidings for AbortSignal * add streaming tests * fix abortion before connecting * fix tests and segfault * add fetch testing abort after finish * fix signal handler cleanup * support signal event Bun.serve * pull tests (failing) * remove unsupported test * formating * fix server Request.signal, fix cleanNativeBindings * add direct tests * more pull tests * fix stream tests * fix fetch, pending onAborted fix in HTTPServerWritable --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-02-15feat(fetch) AbortSignal (#2019)Gravatar Ciro Spaciari 1-0/+60
* add fetch abort signal * get aborted (still segfaults) * bidings.zig u0 error * still GC/memory error * fix start crash * fix AbortSignal fromJS * change fromJS to obj.as * addAbortSignalEventListenner * handle abort types, and add tests * fix tests * add custom reason test * merge 2 substring methods, use MAKE_STATIC_STRING_IMPL * fix create AbortError and TimeoutError, move globalThis and exception creation to main thread * fix tests and rebuild headers * no need to check with substring reason is already an exception * no need to check with substring reason is already an exception * fix dumb error inverting conditions for check reason * fix custom reason behavior
2023-02-14Reject with error when invalid fetch() body (#2047)Gravatar Eric Zhang 1-1/+26
* Reject with error when invalid fetch() body Resolves #2014 * Make sure the test actually throws an exception * Update fetch error paths to return TypeErrors
2023-01-31Re-run prettier after changesGravatar Jarred Sumner 1-95/+39
2023-01-23enhancement(fetch): Merge parameters from request parameter with the second ↵Gravatar Ciro Spaciari 1-1/+1
parameter for fetch, move verbose and proxy options to second parameter, add non-TLS tests for fetch (#1862) * initial steps for proxy-server * added http_proxy in fetch, move 3rd argument to 3nd argument options, add some non-TLS proxy tests * some changes * use only 1 buffer for url+proxy, merge headers on fetch * initial steps * change back to override headers instead of merging in fetch * fix build response.zig * fix conditional in merged headers on fetch * updated with main and make proxy disabled if null is passed Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-01-12Add a couple more tests for errors with Bun.file()Gravatar Jarred Sumner 1-2/+42
2022-12-02Update testGravatar Jarred Sumner 1-2/+2
2022-12-02Tests for set-CookieGravatar Jarred Sumner 1-2/+76
2022-12-02Faster testGravatar Jarred Sumner 1-5/+7
2022-12-01Faster testGravatar Jarred Sumner 1-6/+8
2022-12-01[fetch] Add test that invalid json rejects promiseGravatar Jarred Sumner 1-0/+22
2022-12-01[fetch] Implement `redirect: "manual"`Gravatar Jarred Sumner 1-0/+42
2022-11-25Report `Infinity` when for non-regular files with a size of 0Gravatar Jarred Sumner 1-1/+12
2022-11-25Improve test coverage for `Bun.file`Gravatar Jarred Sumner 1-0/+14
2022-11-15Add test for non-standard Headers API additionsGravatar Jarred Sumner 1-0/+24
2022-11-09Add bun-types, add typechecking, add `child_process` types (#1475)Gravatar Colin McDonnell 1-14/+14
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2022-11-05Fix fetch api to accept stringifier object (#1460)Gravatar zhiyuan 1-2/+16
* fetch accept stringifier object * test: update fetch params tests
2022-10-08Fix https://github.com/oven-sh/bun/issues/1263Gravatar Jarred Sumner 1-7/+28
What happened: when moving to uSockets for the http client, I forgot to call `SSL_set_tlsext_host_name` and uSockets apparently doesn't do that
2022-10-02Fix test failuresGravatar Jarred Sumner 1-1/+1
2022-09-28Add some tests for request body streamingGravatar Jarred Sumner 1-0/+2
Need to fix an off-by-one error with Blob it seems
2022-09-16Make new HTTP client more stableGravatar Jarred Sumner 1-0/+44
2022-06-22change the directory structurejarred/renameGravatar Jarred Sumner 1-0/+440