localhost static method

Future<Server> localhost(
  1. String id, {
  2. bool withNumbers = false,
  3. bool isHttp = true,
  4. Map<String, dynamic>? defaultHeader,
  5. Map<String, dynamic>? defaultBody,
})

Creates Server From Localhost

Implementation

static Future<Server> localhost(String id,
    {bool withNumbers = false,
    bool isHttp = true,
    Map<String, dynamic>? defaultHeader,
    Map<String, dynamic>? defaultBody}) async {
  CookieHandler cookieHandler = CookieHandler(id);
  await cookieHandler.loadCookies();
  return Server(id, withNumbers ? "127.0.0.1" : "localhost", -1, isHttp,
      cookieHandler, defaultHeader ?? {}, defaultBody ?? {});
}