From 753f0641d3a8b0c6bea1ac5f71050c392d8a4321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Weso=C5=82owski?= Date: Thu, 17 Aug 2023 15:04:49 +0200 Subject: [PATCH] Making the response method consistent The methods ok, unauthorized, forbidden, notFound first have body as a parameter, and then the other parameters must be defined, The methods internalServerError and badRequest are different, all parameters are in {} What you might be able to do is to change the parameter definition of the anadere method? --- pkgs/shelf/lib/src/response.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/shelf/lib/src/response.dart b/pkgs/shelf/lib/src/response.dart index d6d3ae0e..908fe01e 100644 --- a/pkgs/shelf/lib/src/response.dart +++ b/pkgs/shelf/lib/src/response.dart @@ -167,8 +167,8 @@ class Response extends Message { /// This indicates that the server has received a malformed request. /// /// {@macro shelf_response_body_and_encoding_param} - Response.badRequest({ - Object? body, + Response.badRequest( + Object? body, { Map */ Object>? headers, Encoding? encoding, Map? context, @@ -242,8 +242,8 @@ class Response extends Message { /// from fulfilling the request. /// /// {@macro shelf_response_body_and_encoding_param} - Response.internalServerError({ - Object? body, + Response.internalServerError( + Object? body, { Map */ Object>? headers, Encoding? encoding, Map? context,