toMap method

Map<String, dynamic> toMap()

Converts the object to a map.

This method is typically used for serialization purposes, allowing the object to be represented as a key-value map. It's useful when you need to send data over the network or store it in a format that requires key-value pairs.

Returns a Map<String, dynamic> containing the object's properties.

Implementation

Map<String, dynamic> toMap() => {
      'url': url,
      'path': path,
      'status': status,
      'header': header,
      'data': data,
      'log': log,
      'method': method,
      'payload': payload,
      'query': query,
    };