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

Add types for fetch request #132

Closed
shoonia opened this issue Sep 9, 2019 · 1 comment
Closed

Add types for fetch request #132

shoonia opened this issue Sep 9, 2019 · 1 comment

Comments

@shoonia
Copy link

shoonia commented Sep 9, 2019

We use the wix-fetch with request options like credentials and cache. May you add more request options to types.

And may you change property body, headers etc... as a not required property.

For example:

type RequestMode = "cors" | "no-cors" | "same-origin";

type RequestCredentials = "omit" | "include" | "same-origin";

type RequestCache =
    "default"
    | "force-cache"
    | "no-cache"
    | "no-store"
    | "only-if-cached"
    | "reload";

type WixFetchRequest = {

    method?: string;

    headers?: object;

    body?: string;

    mode?: RequestMode;

    credentials?: RequestCredentials;

    cache?: RequestCache;
};

Thanks!

@shoonia shoonia closed this as completed Sep 25, 2019
@shoonia
Copy link
Author

shoonia commented Sep 25, 2019

moved this issue to corvid-types wix-incubator/corvid-types#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant