@alterior/express
Advanced tools
Changelog
v3.12.0
@/web-server
WebEvent.current
within custom log formatters and request reporters.HttpError
and have Alterior handle it as expected. This was not possible prior due to
issues long since solved with how extended Error works (when Alterior targeted ES5, this was not possible in Typescript 2.1 or
later). Since this is no longer an issue, this restriction has been lifted.Changelog
v3.11.2
@/web-server
middleware
request reporting event (currently unused by the default request reporter)Changelog
v3.11.1
@/web-server
globalMiddleware
option to @Controller()
. This has the same semantics as middleware
in previous releases,
but with clarified naming.middleware
option of @Controller()
is now deprecated in favor of globalMiddleware
.@Body({ type: 'json' })
feature because of
body-parser
's "strict mode". Disabled "strict mode" when using the JSON mode of the body-parser
middleware
internally.Changelog
v3.11.0
@/annotations
Annotation.decorator()
so that it is dependent on the provided valueTargets
(when
possible). Issue@/web-server
@Body()
decorator. This is useful for cases like trying
to accept JSON strings (since string
normally causes a text
body parser to be used).Changelog
v3.10.2
@/web-server
Content-Type
passed does not match the typical
content type associated with the expected body format. For instance, when expecting JSON (the default), the body
would only be parsed when the Content-Type
header was application/json
. When expecting text (ie when @Body()
has type string
), the body would only be parsed when the Content-Type
header was text/plain
. This is unexpected,
since Alterior provides no manner to validate the Content-Type
field without using custom middleware. Now the body
is parsed as the expected type regardless of Content-Type
.