put_Request method
Request
put_Request(})
Returns a request to put a new file at path
with localData
as content.
lastModified
sets the date when the file was last modified on the server.
created
sets the date when the file was created on the server.
checksum
has to follow checksumPattern. It will not be validated by the server.
See:
- http://www.webdav.org/specs/rfc2518.html#METHOD_PUT for more information.
- put for a complete operation executing this request.
Implementation
http.Request put_Request(
Uint8List localData,
PathUri path, {
DateTime? lastModified,
DateTime? created,
String? checksum,
}) {
final request = http.Request('PUT', _constructUri(path))..bodyBytes = localData;
_addUploadHeaders(
request,
lastModified: lastModified,
created: created,
contentLength: localData.length,
checksum: checksum,
);
_addBaseHeaders(request);
return request;
}