def get_header_value(headers, name): ch = Curlheaders(headers) count = ch.response_count() return ch.http_header(count-1, name)
def get_response_code(headers): ch = Curlheaders(headers) count = ch.response_count() return ch.http_code(count-1)