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

Access request id (packet id) from handler #1676

Closed
muturgan opened this issue Oct 3, 2021 · 2 comments
Closed

Access request id (packet id) from handler #1676

muturgan opened this issue Oct 3, 2021 · 2 comments

Comments

@muturgan
Copy link

muturgan commented Oct 3, 2021

A metacom request body should contains a call field with a unique request identifier.
It will be great to be able to get this value at the request handler. As a second argument for example.

@muturgan muturgan changed the title Get a unique request ID at the request handler [Feature request] Get a unique request ID at the request handler Oct 7, 2021
@tshemsedinov tshemsedinov changed the title [Feature request] Get a unique request ID at the request handler Access request id (packet id) from handler Oct 13, 2021
@tshemsedinov
Copy link
Member

Access id by context.callId

Example:

({
  access: 'public',
  method: async () => {
    const { token, callId } = context;
    return { result: { token, callId } };
  },
});

@tshemsedinov
Copy link
Member

#1811 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants