toJson property

Map<String, dynamic> get toJson

/very unpolished version that only works for my kind of post req

Implementation

Map<String, dynamic> get toJson => {
      'type': 'MultipartRequest',
      'url': this.url.toString(),
      'headers': this.headers,
      'body': this.fields,
      'file-names': this.files.map((e) => e.filename).toList(),
      'method': this.method,
    };