Skip to content

add support for a route() helper to get fully qualified URLs of HTTP endpoints at runtime #3694

Description

@almoehi

For HTTP endpoints declared via @endpoint like so:

  @endpoint({ get: '/assets/{assetName}' })
  async myMethod(assetName: string) {
    ....
  }

It would be great to have a helper function to obtain the fully qualified URL of such an endpoint - incl. domain/hostname of the golem deployment. The existing createWebhook() helper already returns a FQ URL.

Ideally the helper function should support:

The helper method must be able to accept (and validate) named route args for both: path and query args.

Immediate use cases:

  • serving assets and rendering these URLs in templates / html
  • sending out signup / confirmation links via email

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions