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

237 middleware per procedure #388

Merged
merged 10 commits into from
Dec 6, 2023
Merged

237 middleware per procedure #388

merged 10 commits into from
Dec 6, 2023

Conversation

petermasking
Copy link
Member

Fixes #237

Changes proposed in this pull request:

  • Improved middleware implementation (request / response models)
  • Updated middleware documentation
  • Added migration information

@MaskingTechnology/jitar

@petermasking petermasking linked an issue Dec 5, 2023 that may be closed by this pull request
{
const result = await this.#runner.run(fqn, version, args, headers);
const result = await this.#runner.run(request);
Copy link
Member

Choose a reason for hiding this comment

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

I would expect the name of the variable to be called response.


headers.clear();
request.clearHeaders();
Copy link
Member

Choose a reason for hiding this comment

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

Why are you clearing the request headers. We had to clear the headers in the previous setup where we reused the headers map for the response as well, but we do have a separate response object here.


get headers() { return this.#headers; }

clearHeaders()
Copy link
Member

Choose a reason for hiding this comment

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

The return type is missing.

this.#headers.clear();
}

setHeader(name: string, value: string)
Copy link
Member

Choose a reason for hiding this comment

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

The return type is missing.

return this.#headers.get(name);
}

removeHeader(name: string)
Copy link
Member

Choose a reason for hiding this comment

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

The return type is missing.

return this.#args.get(name);
}

removeArgument(name: string)
Copy link
Member

Choose a reason for hiding this comment

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

The return type is missing.


get headers() { return this.#headers; }

setArgument(name: string, value: unknown)
Copy link
Member

Choose a reason for hiding this comment

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

The return type is missing.

@basmasking basmasking merged commit a102f5b into main Dec 6, 2023
7 checks passed
@basmasking basmasking deleted the 237-middleware-per-procedure branch December 6, 2023 05:48
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.

Middleware per procedure
2 participants