Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xk6 extensions experiment: fetch API #2424

Open
mstoykov opened this issue Mar 9, 2022 · 1 comment
Open

xk6 extensions experiment: fetch API #2424

mstoykov opened this issue Mar 9, 2022 · 1 comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6

Comments

@mstoykov
Copy link
Contributor

mstoykov commented Mar 9, 2022

Now that we have event loops and once #2423 is done, it is a good idea to start experimenting and working on making our APIs use it.

A good candidate is k6/http and we have had for some time wondered if we should not implement fetch api.

This should definitely start in an extension and is likely to need changes to netext and httpext which should also probably be first done in the extension alone.

The idea here is not to implement the whole specification. It's mostly to see whether it's possible and whether that will be beneficial for k6. It's also good idea to keep #2311 in mind but also probably most issues labeled with new-http as those are things we would like to support.

This is very likely to not ever be merged in k6, so again, its should not be perfect or complete.

@mstoykov mstoykov added the evaluation needed proposal needs to be validated or tested before fully implementing it in k6 label Mar 9, 2022
@mstoykov mstoykov self-assigned this Mar 9, 2022
@rohit-gohri
Copy link

rohit-gohri commented Oct 18, 2023

Might be relevant to look at the work WinterCG (Web-interoperable Runtimes Community Group) is doing in trying to come up with a spec for fetch on server side runtimes - https://github.com/wintercg/fetch

Supporting fetch would mean that users would be free to use their preferred request library like axios, got or any future ones. It also enables support for things like graphql clients and lots of 3rd party SDKs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6
Projects
None yet
Development

No branches or pull requests

2 participants