<commit_before>use hyper;

pub type HyperResponse = hyper::client::response::Response;

#[derive(Debug)]
pub struct Response {
    pub url: String,
    pub status_code: u16,
    pub reason: String,
    raw: HyperResponse,
}

impl Response {
    pub fn from_hyper(raw: HyperResponse) -> Self {
        let status_code;
        let reason;
        {
            let &hyper::http::RawStatus(sc, ref r) = raw.status_raw();
            status_code = sc;
            reason = r.to_string();
        }
        Response {
            url: raw.url.serialize(),
            status_code: status_code,
            reason: reason,
            raw: raw,
        }
    }
}<commit_msg>Add ok field<commit_after>use hyper;

pub type HyperResponse = hyper::client::response::Response;

#[derive(Debug)]
pub struct Response {
    pub url: String,
    pub status_code: u16,
    pub reason: String,
    pub ok: bool,
    raw: HyperResponse,
}

impl Response {
    pub fn from_hyper(raw: HyperResponse) -> Self {
        let status_code;
        let reason;
        {
            let &hyper::http::RawStatus(sc, ref r) = raw.status_raw();
            status_code = sc;
            reason = r.to_string();
        }
        Response {
            url: raw.url.serialize(),
            status_code: status_code,
            reason: reason,
            ok: status_code == 200,
            raw: raw,
        }
    }
}
{'fraction_non_alphanumeric': 0.11071171818835371, 'fraction_numerical': 0.0050323508267433505, 'mean_word_length': 1.887966804979253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1747036', 'n_tokens_mistral': 421, 'n_tokens_neox': 412, 'n_words': 108}