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: Http endpoint base class with request context access #18

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

johanandren
Copy link
Member

@johanandren johanandren commented Nov 21, 2024

Only showcased on ACL and JWT doc pages so far, once we add header support, it will go on the HTTP endpoint page as well.

@github-actions github-actions bot added documentation documentation related java-sdk labels Nov 21, 2024
# Conflicts:
#	akka-javasdk/src/main/java/akka/javasdk/http/RequestContext.java
#	akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
@johanandren johanandren force-pushed the wip-optional-endpoint-baseclass branch from 0f6b24f to 06cda58 Compare November 21, 2024 11:41
/**
* Optional base class for HTTP endpoints giving access to a request context without additional constructor parameters
*/
abstract public class AbstractHttpEndpoint {
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, we could call it RequestContextSupport.

And maybe better if we make this a interface with default methods. As such users can use it as a mixin instead.

And have some other base classes on their own.

Copy link
Member Author

Choose a reason for hiding this comment

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

We need a field so interface does not work.

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes, that's true.

Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

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

LGTM

@octonato octonato merged commit 34cbd24 into main Nov 21, 2024
24 checks passed
@octonato octonato deleted the wip-optional-endpoint-baseclass branch November 21, 2024 14:29
johanandren added a commit that referenced this pull request Nov 21, 2024
* feat: Http endpoint base class with request context access

# Conflicts:
#	akka-javasdk/src/main/java/akka/javasdk/http/RequestContext.java
#	akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala

* post rebase fixes

* formatting...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation related java-sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants