Skip to content

feat: query params support - #263

Merged
aludwiko merged 9 commits into
mainfrom
query-params-wip
Mar 14, 2025
Merged

aludwiko merged 9 commits into
mainfrom
query-params-wip

Conversation

@aludwiko

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the documentation documentation related label Feb 25, 2025
* `akka.http.javadsl.model.HttpRequest` for a low level, streaming representation of the entire request
including headers. See xref:http-endpoints.adoc#_low_level_requests[] below for more details

=== Request headers ===

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Move it here, I think this is still a basic interaction with endpoints.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not what you immediately need to build a HTTP API, so I think it was good that it at least is further down the page and not before doing basics like how to return something. Maybe keep in basic block but last?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My ordering idea was:

  • basic stuff for request
  • basic stuff for response

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok fair enough

@aludwiko
aludwiko marked this pull request as ready for review February 25, 2025 10:19
Integer b = requestContext().queryParams().getInteger("b").get();
Long c = requestContext().queryParams().getLong("c").get();
return "name: " + name + ", a: " + a + ", b: " + b + ", c: " + c;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this.

* `akka.http.javadsl.model.HttpRequest` for a low level, streaming representation of the entire request
including headers. See xref:http-endpoints.adoc#_low_level_requests[] below for more details

=== Request headers ===

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not what you immediately need to build a HTTP API, so I think it was good that it at least is further down the page and not before doing basics like how to return something. Maybe keep in basic block but last?

@patriknw patriknw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looking good

@patriknw

patriknw commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Marking this as draft until we have updated runtime, and I really want to cut a SDK release as soon as runtime 1.4.2 is out in prod.

@patriknw
patriknw marked this pull request as draft March 4, 2025 10:32

@johanandren johanandren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to go as soon as runtime can be bumped.

# Conflicts:
#	akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
@patriknw

Copy link
Copy Markdown
Contributor

To be clear, this requires a new runtime. The runtime part is not included in 1.4.2.
https://github.com/lightbend/kalix-runtime/pull/3547

@patriknw

Copy link
Copy Markdown
Contributor

this should be ready for a rebase now, main has runtime 1.4.3

# Conflicts:
#	akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
@aludwiko
aludwiko marked this pull request as ready for review March 14, 2025 08:43
@aludwiko
aludwiko merged commit 3199616 into main Mar 14, 2025
@aludwiko
aludwiko deleted the query-params-wip branch March 14, 2025 08:53
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.

3 participants