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

[FEAT]: Allow request customization #4

Closed
VanishMax opened this issue Dec 6, 2023 · 3 comments
Closed

[FEAT]: Allow request customization #4

VanishMax opened this issue Dec 6, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@VanishMax
Copy link
Collaborator

Description

Hi! I loved reading and using this library, it is simple yet powerful.

There was an issue for me while making requests. It is common to provide additional headers like mode or authorization, or even change methods for some cases. Therefore, I'd want to propose extending the request logic by adding the requestOptions: RequestInit property and pass it to fetch like this: const response = await fetch(this.props.url, this.props.requestOptions);

@VanishMax VanishMax added the enhancement New feature or request label Dec 6, 2023
@codeacme17
Copy link
Owner

Thanks for your issue and the like!
I apologize that I didn't take fetch's configurability into account during the initial design, I'll be adding that feature as soon as I can this week!

@VanishMax
Copy link
Collaborator Author

@codeacme17 I could implement it in the next hour if you're alright with that.

@codeacme17
Copy link
Owner

@codeacme17 I could implement it in the next hour if you're alright with that.

Sure! I would greatly appreciate it if you could submit a PR!

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

No branches or pull requests

2 participants