platform/packages/body_parser/lib/src/body_parse_result.dart

29 lines
778 B
Dart
Raw Normal View History

import 'file_upload_info.dart';
/// A representation of data from an incoming request.
2017-01-14 13:50:02 +00:00
abstract class BodyParseResult {
/// The parsed body.
2017-01-14 13:50:02 +00:00
Map<String, dynamic> get body;
/// The parsed query string.
2017-01-14 13:50:02 +00:00
Map<String, dynamic> get query;
/// All files uploaded within this request.
2017-01-14 13:50:02 +00:00
List<FileUploadInfo> get files;
/// The original body bytes sent with this request.
2018-08-11 02:08:44 +00:00
///
2017-01-14 13:50:02 +00:00
/// You must set [storeOriginalBuffer] to `true` to see this.
List<int> get originalBuffer;
2017-07-19 21:20:57 +00:00
/// If an error was encountered while parsing the body, it will appear here.
///
/// Otherwise, this is `null`.
dynamic get error;
/// If an error was encountered while parsing the body, the call stack will appear here.
///
/// Otherwise, this is `null`.
StackTrace get stack;
}