Skip to content

Property 'body' does not exist on type 'ParsedResponse' #1362

Description

@Vandivier

Description / Steps to reproduce / Feature proposal

consider the following controller.ts:

    export class Get_access_tokenController {
      PUBLIC_TOKEN = this.request.body.public_token;
      constructor(@inject(RestBindings.Http.REQUEST) private request: ParsedRequest) {}

      // Map to `GET /get_access_token`
      @get('/get_access_token')
      ping(): object {
        return {
           PUBLIC_TOKEN,
        };
      }
    }

Current Behavior

1 - My IDE (Brackets) throws on line 2: "Property 'body' does not exist on type 'ParsedResponse'"
2 - Docs state "Request - (TBD) missing API docs link"

Expected Behavior

1 - Docs exist for ParsedResponse, showing what properties exist there
2 - I have some way to access the request body

May be related to 1038, but I don't see a requirement about documentation over there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions