of static method
Checks whether request
has a multipart boundary and, if so, wraps the
request in a MultipartRequest type allowing the individual parts to be
accessed.
Requests are considered to have a multipart body if they have a
Content-Type
header with a multipart
type and a valid boundary
parameter as defined by section 5.1.1 of RFC 2046.
Implementation
static MultipartRequest? of(Request request) {
var boundary = _extractMultipartBoundary(request);
if (boundary == null) {
return null;
} else {
return MultipartRequest._((request, boundary.$1, boundary.$2));
}
}