|
@@ -107,7 +107,7 @@ namespace Astralis {
|
|
|
|
|
|
|
|
/// Parse form data from an AsyncPipe, auto-detecting content type
|
|
/// Parse form data from an AsyncPipe, auto-detecting content type
|
|
|
/// content_type_header should be the full Content-Type header value
|
|
/// content_type_header should be the full Content-Type header value
|
|
|
- public static async FormData parse(AsyncPipe pipe, string content_type_header) throws Error {
|
|
|
|
|
|
|
+ public static async FormData parse(AsyncInput pipe, string content_type_header) throws Error {
|
|
|
if (content_type_header.contains("multipart/form-data")) {
|
|
if (content_type_header.contains("multipart/form-data")) {
|
|
|
string boundary = extract_boundary(content_type_header);
|
|
string boundary = extract_boundary(content_type_header);
|
|
|
return yield parse_multipart(pipe, boundary);
|
|
return yield parse_multipart(pipe, boundary);
|
|
@@ -119,7 +119,7 @@ namespace Astralis {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Parse application/x-www-form-urlencoded data from AsyncPipe
|
|
/// Parse application/x-www-form-urlencoded data from AsyncPipe
|
|
|
- public static async FormData parse_urlencoded(AsyncPipe pipe) throws Error {
|
|
|
|
|
|
|
+ public static async FormData parse_urlencoded(AsyncInput pipe) throws Error {
|
|
|
var body = yield pipe.read_all();
|
|
var body = yield pipe.read_all();
|
|
|
var body_str = body.to_raw_string();
|
|
var body_str = body.to_raw_string();
|
|
|
|
|
|
|
@@ -161,7 +161,7 @@ namespace Astralis {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Parse multipart/form-data from AsyncPipe
|
|
/// Parse multipart/form-data from AsyncPipe
|
|
|
- public static async FormData parse_multipart(AsyncPipe pipe, string boundary) throws Error {
|
|
|
|
|
|
|
+ public static async FormData parse_multipart(AsyncInput pipe, string boundary) throws Error {
|
|
|
var body = yield pipe.read_all();
|
|
var body = yield pipe.read_all();
|
|
|
|
|
|
|
|
// Extract bytes from BinaryData using write_to
|
|
// Extract bytes from BinaryData using write_to
|