/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/transport/http/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1811
1811
                report_activity=self._report_activity, ca_certs=ca_certs)
1812
1812
 
1813
1813
    def request(self, method, url, fields=None, headers=None, **urlopen_kw):
 
1814
        body = urlopen_kw.pop('body', None)
1814
1815
        if fields is not None:
1815
1816
            data = urlencode(fields).encode()
 
1817
            if body is not None:
 
1818
                raise ValueError(
 
1819
                    'body and fields are mutually exclusive')
1816
1820
        else:
1817
 
            data = urlopen_kw.pop('body', None)
 
1821
            data = body
1818
1822
        if headers is None:
1819
1823
            headers = {}
1820
1824
        request = Request(method, url, data, headers)