Skip to content
Myr

Merge pull request #1667 from Lukasa/json2

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

Second time lucky for json related fixes.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 097121d, bea2060 · Browse files · 1 file+2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/models.py+2 added-2 removed
134 unmodified lines
135 fp = StringIO(fp)136 if isinstance(fp, bytes):137 fp = BytesIO(fp)138139 rf = RequestField(name=k, data=fp.read(), 139 rf = RequestField(name=k, data=fp.read(),140 filename=fn, headers=fh)141 rf.make_multipart(content_type=ft)142 new_fields.append(rf)143
545 unmodified lines
689 # a best guess).690 encoding = guess_json_utf(self.content)691 if encoding is not None:692 return json.loads(self.content.decode(encoding), **kwargs)693 return json.loads(self.text or self.content, **kwargs)693 return json.loads(self.text, **kwargs)694695 @property696 def links(self):697 """Returns the parsed header links of the response, if any."""
36 unmodified lines