文件操作 - resource.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/lazr/restfulclient/__pycache__/resource.cpython-310.pyc
编辑文件内容
o �`^� � @ s� d Z eZg d�ZddlmZ ddlmZ ddlm Z m Z zddlmZm Z mZmZmZ W n eyG ddl mZm Z mZ ddlmZmZ Y nw dd lZejd d krXeZeZneZeZddlmZ ddlmZ dd lm Z ddl!m"Z"m#Z# ddl$m%Z% ddl&m'Z' e(� Z)G dd� d�Z*G dd� d�Z+G dd� de+�ZG dd� de�Z,G dd� de�Z-G dd� de�Z.G dd� de+�Z/G dd � d e�Z0G d!d"� d"e�Z1G d#d$� d$e1�Z2G d%d&� d&e�Z3d S )'z)Common support for web service resources.)� Collection�CollectionWithKeyBasedLookup�Entry�NamedOperation�Resource�ServiceRoot� )�Message)�BytesIO)�dumps�loads)�urljoin�urlparse�parse_qs�unquote� urlencode)r r r )r r N� )�URI)r )�__version__)�Browser�RestfulHttp)�DatetimeJSONEncoder)� HTTPErrorc @ s* e Zd ZdZdd� Zd dd�Zdd� ZdS ) �HeaderDictionarya� A dictionary that bridges httplib2's and wadllib's expectations. httplib2 expects all header dictionary access to give lowercase header names. wadllib expects to access the header exactly as it's specified in the WADL file, which means the official HTTP header name. This class transforms keys to lowercase before doing a lookup on the underlying dictionary. That way wadllib can pass in the official header name and httplib2 will get the lowercased name. c C s || _ d S �N)�wrapped_dictionary)�selfr � r �=/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py�__init__I s zHeaderDictionary.__init__Nc C s | j �|�� �S �z2Retrieve a value, converting the key to lowercase.)r �get�lower)r �key�defaultr r r r L s zHeaderDictionary.getc C s | � |t�}|tu rt|��|S r )r �missing�KeyError)r r"