Open DartBot opened 9 years ago
Comment by sethladd
Is this a suggestion for a new shelf_ plugin, or behavior in shelf itself?
Removed Type-Defect label. Added Type-Enhancement, Pkg-Shelf, Area-Pkg, Triaged labels.
Comment by Andersmholmgren
Actually upon reflection maybe this is best left to the community.
Something like shelf_body that provides these transformations of the body.
It's certainly a common requirement though to transform the body based on the accept headers etc
Comment by nex3
I think it's reasonable to add this functionality to the shelf Request class. In general, that class is allowed to expose more-parsed (generally lazily-parsed) views of the request data.
Issue by Andersmholmgren Originally opened as dart-lang/sdk#20160
Shelf currently only exposes the body as a string or byte stream.
http_server provided a sophisticated parser of the body in relation to the request headers content type.
A similar function is sorely missing from shelf