Skip to content
Myr

prepared request docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 6e780fa · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:requests/models.py+6 added-2 removed
195 unmodified lines
196 def __repr__(self):197 return '<Request [%s]>' % (self.method)198199 def prepare(self):200 """Constructs a PreparedRequest for transmission and returns it."""200 """Constructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it."""201 p = PreparedRequest()202203 p.prepare_method(self.method)204 p.prepare_url(self.url, self.params)
7 unmodified lines
212 return p213214215class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):216 """The :class:`PreparedRequest <PreparedRequest>` object."""216 """The fully mutable :class:`PreparedRequest <PreparedRequest>` object,217 containing the exact bytes that will be sent to the server.218219 Generated from a :class:`Request <Request>` object or manually.220 """221222 def __init__(self):223 self.method = None224 self.url = None225 self.headers = None
362 unmodified lines