GenkitHttpRequest class final

A framework-neutral HTTP request, the input of a GenkitHttpHandler.

Dart HTTP stacks don't share a request type (dart:io has HttpRequest, shelf has Request, ...), so Genkit's HTTP layer speaks this minimal shape and adapters translate to and from it. GenkitRouter.handleHttpRequest and ioHandler are the built-in dart:io adapters; package:genkit_shelf is the shelf one.

Constructors

GenkitHttpRequest({required String method, required String path, Map<String, String> headers = const {}, Map<String, String> queryParameters = const {}, Stream<List<int>>? body})

Properties

body → Stream<List<int>>
The raw request body. Can be listened to once.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
Request headers with lowercased names. Repeated headers are joined with , .
final
method → String
The HTTP method, e.g. POST.
final
path → String
The percent-decoded request path relative to where the handler is mounted, starting with / (e.g. /myFlow for a router mounted at /api receiving /api/myFlow).
final
queryParameters → Map<String, String>
Decoded query parameters.
final
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

Operators

operator ==(Object other) → bool
The equality operator.
inherited