(self, data, content_type)
| 436 | return WSGIRequest(self._base_environ(**request)) |
| 437 | |
| 438 | def _encode_data(self, data, content_type): |
| 439 | if content_type is MULTIPART_CONTENT: |
| 440 | return encode_multipart(BOUNDARY, data) |
| 441 | else: |
| 442 | # Encode the content so that the byte representation is correct. |
| 443 | match = CONTENT_TYPE_RE.match(content_type) |
| 444 | if match: |
| 445 | charset = match[1] |
| 446 | else: |
| 447 | charset = settings.DEFAULT_CHARSET |
| 448 | return force_bytes(data, encoding=charset) |
| 449 | |
| 450 | def _encode_json(self, data, content_type): |
| 451 | """ |
no test coverage detected