cloud_blob_properties blob_response_parsers::parse_blob_properties(const web::http::http_response& response) { cloud_blob_properties properties; properties.m_etag = parse_etag(response); properties.m_last_modified = parse_last_modified(response); properties.m_lease_status = parse_lease_status(response); properties.m_lease_state = parse_lease_state(response); properties.m_lease_duration = parse_lease_duration(response); properties.m_size = parse_blob_size(response); auto& headers = response.headers(); properties.m_page_blob_sequence_number = utility::conversions::scan_string<int64_t>(get_header_value(headers, ms_header_blob_sequence_number)); properties.m_append_blob_committed_block_count = utility::conversions::scan_string<int>(get_header_value(headers, ms_header_blob_committed_block_count)); properties.m_cache_control = get_header_value(headers, web::http::header_names::cache_control); properties.m_content_disposition = get_header_value(headers, header_content_disposition); properties.m_content_encoding = get_header_value(headers, web::http::header_names::content_encoding); properties.m_content_language = get_header_value(headers, web::http::header_names::content_language); properties.m_content_type = get_header_value(headers, web::http::header_names::content_type); properties.m_type = parse_blob_type(get_header_value(headers, ms_header_blob_type)); properties.m_content_md5 = get_header_value(headers, ms_header_blob_content_md5); if (properties.m_content_md5.empty()) { properties.m_content_md5 = get_header_value(headers, web::http::header_names::content_md5); } properties.m_server_encrypted = response_parsers::parse_boolean(get_header_value(headers, ms_header_server_encrypted)); properties.m_is_incremental_copy = response_parsers::parse_boolean(get_header_value(headers, ms_header_incremental_copy)); return properties; }
cloud_blob_container_properties blob_response_parsers::parse_blob_container_properties(const web::http::http_response& response) { cloud_blob_container_properties properties; properties.m_etag = parse_etag(response); properties.m_last_modified = parse_last_modified(response); properties.m_lease_status = parse_lease_status(response); properties.m_lease_state = parse_lease_state(response); properties.m_lease_duration = parse_lease_duration(response); properties.m_public_access = parse_public_access_type(response); return properties; }
lease_duration parse_lease_duration(const web::http::http_response& response) { return parse_lease_duration(get_header_value(response, ms_header_lease_duration)); }