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

refactor(server): make ProxyGetRequestLayer http middleware support multiple path-method pairs #1492

Conversation

koushiro
Copy link
Contributor

@koushiro koushiro commented Nov 7, 2024

BREAKING CHNAGES:

  • change ProxyGetRequestLayer::new method to support multiple path-method pairs
  • remove ProxyGetRequest::new method, which is useless

@koushiro koushiro requested a review from a team as a code owner November 7, 2024 03:08
@koushiro koushiro changed the title refactor(server): make ProxyGetRequest http middleware support multiple path-method pairs refactor(server): make ProxyGetRequestLayer http middleware support multiple path-method pairs Nov 7, 2024
… multiple path-method pairs

**BREAKING CHNAGES**:

- change `ProxyGetRequestLayer::new` method to support multiple path-method pairs
- remove `ProxyGetRequest::new` method, which is useless
@koushiro koushiro force-pushed the refactor-proxy-get-request-middleware branch from c62a917 to e5ada32 Compare November 7, 2024 03:09
@koushiro
Copy link
Contributor Author

koushiro commented Nov 7, 2024

@niklasad1 @jsdw PTAL

@@ -15,27 +15,28 @@ publish = true

[dependencies]
futures-util = { version = "0.3.14", default-features = false, features = ["io", "async-await-macro"] }
jsonrpsee-types = { workspace = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you sort the dependencies here or why is this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is automatically done by my vscode extension if I change the Cargo.toml.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dq: that sounds useful, what extension are you using?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good
I guess it may be useful for users that want to expose several endpoints.

@niklasad1 niklasad1 requested a review from lexnv November 15, 2024 14:26
@niklasad1 niklasad1 added the breaking change Breaking change in the public APIs label Nov 15, 2024
Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just some minor notes on deduplication of paths for better user errors
Thanks for contributing 🙏

@koushiro koushiro requested a review from lexnv November 15, 2024 17:31
Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@niklasad1 niklasad1 merged commit 426a832 into paritytech:master Nov 25, 2024
8 checks passed
@koushiro koushiro deleted the refactor-proxy-get-request-middleware branch November 25, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking change in the public APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants