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(openapi-fetch): add support for arbitrary method #2063

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

kerwanp
Copy link
Contributor

@kerwanp kerwanp commented Dec 21, 2024

Changes

This Pull request closes #1808 by providing a request method that accept a method as its first arguments allowing to pass any HttpMethod. Making library authors' life easier.

This does not introduce any breaking change.

How to Review

A new request should be available on the client that must behave exactly like the other GET, OPTIONS, etc methods but with the ability to pass the HttpMethod as first parameter.

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)

@kerwanp kerwanp requested a review from a team as a code owner December 21, 2024 16:10
@kerwanp kerwanp requested a review from drwpow December 21, 2024 16:10
Copy link

netlify bot commented Dec 21, 2024

Deploy Preview for openapi-ts canceled.

Name Link
🔨 Latest commit f6a2db0
🔍 Latest deploy log https://app.netlify.com/sites/openapi-ts/deploys/67716da24a8c1f000875093d

Copy link

changeset-bot bot commented Dec 21, 2024

🦋 Changeset detected

Latest commit: f6a2db0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
openapi-fetch Patch
openapi-react-query Patch
swr-openapi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kerwanp kerwanp added enhancement New feature or request openapi-fetch Relevant to the openapi-fetch library labels Dec 21, 2024
@kerwanp kerwanp force-pushed the feat/fetch-request branch 2 times, most recently from 53b3c32 to 2335067 Compare December 21, 2024 16:14
.changeset/hot-pants-sit.md Outdated Show resolved Hide resolved
@kerwanp kerwanp requested a review from drwpow December 29, 2024 15:42
@drwpow drwpow merged commit 5935cd2 into openapi-ts:main Jan 3, 2025
12 checks passed
@openapi-ts-bot openapi-ts-bot mentioned this pull request Jan 3, 2025
@gzm0
Copy link
Contributor

gzm0 commented Jan 6, 2025

FWIW: I've briefly checked whether it is worth backporting this to the path-based client and I believe for now it isn't: The API is lower-level than what the path-based client offers. So IMO it is unlikely someone would want the combination of path-based but arbitrary method.

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

Successfully merging this pull request may close these issues.

[openapi-fetch] Provide client.request() to support dynamic method.
3 participants