Skip to content

Robust HTTP processing capabilities (DP3) #1038

@dhmlau

Description

@dhmlau

Based on discussion with @raymondfeng @kjdelisle:
We need robust HTTP processing capabilities to deal with HTTP layer policies

  • e.g. CORS, compression/decompression, content negotiation.

@raymondfeng 's initial investigation:

  • we don't want to take the burden to implement the HTTP stack.
  • base functionality from node core is not good enough
  • Possibility is:
    • to use Express base without routing plus the common middleware
    • or we can use Koa

DP3 scope

  • Must have: rework internals to use Express request/response types
  • Leverage CORS middleware instead of the current workaround (minimal refactoring)
  • HttpEndpointFactory - a new module to deal with HTTP(S) setup, a dependency of @loopback/rest
  • Stretch goal: serving OpenAPI spec document should be implemented in a controller method

Out of scope

  • Local API Explorer (Swagger UI) should be implemented using Express middleware
  • Expose Express to app developers, allow them to add custom middleware

Additional Information

Relevant: #180

Metadata

Metadata

Labels

RESTIssues related to @loopback/rest package and REST transport in generalepic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions