rest-vir - v2.2.0
    Preparing search index...

    Function handleSearchParams

    • Handles a request's search params and compares it against the route's required search params shape, if it has any.

      Parameters

      • __namedParameters: Readonly<
            {
                api: Readonly<ApiDefinition>;
                request: Readonly<
                    SelectFrom<
                        ServerRequest,
                        { method: true; originalUrl: true; query: true },
                    >,
                >;
                route: Readonly<EndpointImplementation | WebSocketImplementation>;
                serverLogger: Readonly<ServerLogger>;
            },
        >

      Returns
          | {
              body?: string;
              statusCode: | 400
              | 401
              | 402
              | 403
              | 404
              | 405
              | 406
              | 407
              | 408
              | 409
              | 410
              | 411
              | 412
              | 413
              | 414
              | 415
              | 416
              | 417
              | 418
              | 421
              | 422
              | 423
              | 424
              | 425
              | 426
              | 428
              | 429
              | 431
              | 451
              | 500
              | 501
              | 502
              | 503
              | 504
              | 505
              | 506
              | 507
              | 508
              | 510
              | 511;
          }
          | { searchParams: BaseSearchParams }

      • {
            body?: string;
            statusCode:
                | 400
                | 401
                | 402
                | 403
                | 404
                | 405
                | 406
                | 407
                | 408
                | 409
                | 410
                | 411
                | 412
                | 413
                | 414
                | 415
                | 416
                | 417
                | 418
                | 421
                | 422
                | 423
                | 424
                | 425
                | 426
                | 428
                | 429
                | 431
                | 451
                | 500
                | 501
                | 502
                | 503
                | 504
                | 505
                | 506
                | 507
                | 508
                | 510
                | 511;
        }
        • Optionalbody?: string
        • statusCode:
              | 400
              | 401
              | 402
              | 403
              | 404
              | 405
              | 406
              | 407
              | 408
              | 409
              | 410
              | 411
              | 412
              | 413
              | 414
              | 415
              | 416
              | 417
              | 418
              | 421
              | 422
              | 423
              | 424
              | 425
              | 426
              | 428
              | 429
              | 431
              | 451
              | 500
              | 501
              | 502
              | 503
              | 504
              | 505
              | 506
              | 507
              | 508
              | 510
              | 511

          If this is set, then the response is sent with this status code and the given body (if any).

      • { searchParams: BaseSearchParams }