from static method

HttpBody? from(
  1. Object? body, [
  2. MimeType? mimeType
])

Implementation

static HttpBody? from(Object? body, [MimeType? mimeType]) {
  if (body == null) return null;
  if (body is HttpBody) return body;
  return HttpBody._(body, mimeType);
}