RequestBody.createBytes constructor

RequestBody.createBytes(
  1. List bytes, {
  2. String? contentType,
})

Implementation

factory RequestBody.createBytes(List bytes, {String? contentType}) {
  return RequestBody._(
    content: bytes,
    contentType: contentType ?? "application/json; charset=utf-8",
  );
}