CorujaJsonRequest class
Define uma personalização do CorujaRequest
com facilidades para tratar requisições
que tenham corpo em formato JSON ou precisem responder com conteúdo em JSON.
- Inheritance
-
- Object
- CorujaRequest
- CorujaJsonRequest
Constructors
-
CorujaJsonRequest(HttpRequest request, Map<
String, String> routeParams)
Properties
-
body
→ FutureOr<
String> -
Processa e retorna o conteúdo do corpo da requisição (se houver).
no setterinherited
- contentType → String?
-
Retorna o tipo do corpo da requisição (content type: mime)
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
json
→ FutureOr<
Map< String, dynamic> ?> -
Obtém, do corpo da requisição, um
Map<String, dynamic>
representando um JSON interpretado.no setter -
queryParams
→ Map<
String, String> -
Retorna um
Map<String, String>
com os parâmetros de consulta (query params)no setterinherited -
routeParams
→ Map<
String, String> -
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeJsonResponse(
{int code = 200, Object? jsonContent}) → void - Facilita a resposta quando o conteúdo deve ser um JSON.
-
writeResponse(
{int code = 200, String content = ''}) → void -
Envia um retorno ao cliente HTTP definindo o código de resposta (code) e seu conteúdo (content).
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited