TransportHTTP constructor

TransportHTTP({
  1. required String hostname,
  2. Duration timeout = const Duration(seconds: 10),
})

Implementation

TransportHTTP(
    {required this.hostname, this.timeout = const Duration(seconds: 10)}) {
  if (!isURL(hostname)) {
    throw FormatException('hostname should be an URL.');
  }

  headers["Content-type"] = "application/x-www-form-urlencoded";
  //header["Content-type"] =  "application/json";
  headers["Accept"] = "text/plain";
}