Skip to content

Expose the original Request #283

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

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

igalshilman
Copy link
Contributor

This PR exposes the raw request on the Context. A request represents the raw request as issued for this handler. This includes the request headers, and the raw body.

@slinkydeveloper slinkydeveloper linked an issue Mar 20, 2024 that may be closed by this pull request
* A request object includes the request headers, and the raw unparsed
* request body.
*/
export interface Request {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about moving the field Context.id and Context.serviceName (which needs to be renamed) here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do u have it like that in the java sdk?

Copy link
Contributor

Choose a reason for hiding this comment

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

i don't have serviceName in java sdk (seems redundant to me 🤷 ), id yes i have it, it's named Request#invocationId(): https://github.com/restatedev/sdk-java/blob/main/sdk-common/src/main/java/dev/restate/sdk/common/Request.java#L27

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the id is used in various places, so I don't want to do this as part of the passing headers PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as discussed offline, moved to the request object, and serviceName removed.

This commit exposes the raw request on the Context.
A request represents the raw request as issued for
this handler. This includes the request headers, and the raw body.
@igalshilman
Copy link
Contributor Author

Thanks for your fast review @slinkydeveloper, going to merge this once green.

@igalshilman igalshilman merged commit 126a23b into restatedev:main Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose headers sent through InputEntryMessage
2 participants