MCPcopy
hub / github.com/django/django / get_str_from_wsgi

Function get_str_from_wsgi

django/core/handlers/wsgi.py:200–207  ·  view source on GitHub ↗

Get a value from the WSGI environ dictionary as str. key and default should be str objects.

(environ, key, default)

Source from the content-addressed store, hash-verified

198
199
200def get_str_from_wsgi(environ, key, default):
201 """
202 Get a value from the WSGI environ dictionary as str.
203
204 key and default should be str objects.
205 """
206 value = get_bytes_from_wsgi(environ, key, default)
207 return value.decode(errors="replace")

Callers 1

COOKIESMethod · 0.85

Calls 2

get_bytes_from_wsgiFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected