Function GET

  • Decorator that registers a GET method on the HTTP server.

    Parameters

    • path: string

      The path for the GET method.

    Returns ((target, propertyKey) => void)

      • (target, propertyKey): void
      • Parameters

        • target: any
        • propertyKey: string

        Returns void

    Example

    The following code registers a GET method on the server.

    @GET("/example")
    async getExample(request: HttpRequest): Promise<HttpResponse> {
    return {
    content: "...",
    contentType: "text/plain",
    status: 200,
    contentEncoding: "binary" // supports "base64"
    }
    }

Generated using TypeDoc