Client constructor

Client(
  1. String serverIp,
  2. int serverPort,
  3. String path, {
  4. Map<String, dynamic>? query,
  5. bool verbose = false,
  6. bool isSecured = false,
  7. Map<String, String>? headers,
  8. List<int>? expectedStatusCodes,
  9. String contentType = 'application/json',
  10. int? timeout,
  11. Function? onTimeout,
})

Implementation

Client(
	this.serverIp,
	this.serverPort,
	this.path,{
		this.query,
		this.verbose=false,
		this.isSecured=false,
		this.headers,
		this.expectedStatusCodes,
		this.contentType='application/json',
		this.timeout,
		this.onTimeout
	}){

	if(expectedStatusCodes != null){
		if(!expectedStatusCodes!.contains(ok)){
			expectedStatusCodes!.add(ok);
		}
	}  else {
		expectedStatusCodes = [ok];
	}
	_now = DateTime.now().toString();
}