Skip to content

Missing doc about form-data parameters in controller #1797

Description

@JesusTheHun

In the documentation about route parameters ( https://loopback.io/doc/en/lb4/Routes.html#parameters ) it is mentioned "form Data". However, no where we can see a use of it. And right now, I'm unable to catch any submitted data from the form.

In my case, in the sequence, the call of this.parseParams(request, route) return an array of undefined values. So obviously I'm missing something, and document it would be great !

Exemple :

export class RegistrationController {

  // stuff 

  @post('/register', {
    responses: {
      '200': {
        description: 'Registration information page',
        content: {'text/html': {schema: {type: 'string'}}},
      },
    },
  })
  create(
    @param.query.string('email') email: string,
    @param.query.string('password') password: string,
  ): Promise<string> {
    // email & password are empty
  }
}

Metadata

Metadata

Assignees

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