
header "openssl" as ssl

// enum METHOD {
//     GET,
//     POST,
//     PUT,
//     PATCH,
// }

+ class Options {
    + body: String ("")
    + query_data: ?Map[String]
    + headers: ?Map[String]
    + output_to_file: ?String
    + follow_redirects: bool (true)

    //////////////////////////////
    // Configure headers
    //////////////////////////////

    + fn get_headers() Map[String] {
        let hh = this.headers
        if !isset(hh) {
            hh = Map[String]{}
            this.headers = hh
            return hh
        }
        return hh
    }
    + fn set_header(key: String, value: String) SELF {
        let hh = this.get_headers()
        hh.set(key, value)
        return this
    }
    + fn set_headers(headers: Map[String]) SELF {
        each headers as v, k : this.set_header(k, v)
        return this
    }
    + fn clear_headers(key: String, value: String) SELF {
        let hh = this.headers
        if isset(hh) : hh.clear()
        return this
    }

    //////////////////////////////
    // Configure SSL (TODO)
    //////////////////////////////
}
