getBody method

dynamic getBody()

returns the request body object

Implementation

getBody() async {
  // if we got a map body
  if (body?.bodyType == TrayRequestBodyType.map) {
    return body?.getMap();
  }

  // if we got a map body
  if (body?.bodyType == TrayRequestBodyType.list) {
    return body?.getList();
  }

  // otherwise just return the body as is
  return body;
}