Skip to content

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

Merged
niklasad1 merged 4 commits intoparitytech:masterfrom
koushiro-contrib:refactor-proxy-get-request-middleware
Nov 25, 2024
Merged

refactor(server): make ProxyGetRequestLayer http middleware support multiple path-method pairs#1492
niklasad1 merged 4 commits intoparitytech:masterfrom
koushiro-contrib:refactor-proxy-get-request-middleware

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


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

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
Contributor

@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
@koushiro koushiro deleted the refactor-proxy-get-request-middleware branch November 25, 2024 07:47
@niklasad1 niklasad1 mentioned this pull request Apr 23, 2025
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