Create a new WSGI environ dict based on the values passed. The first parameter should be the path of the request which defaults to '/'. The second one can either be an absolute path (in that case the host is localhost:80) or a full path to the request with scheme, netloc port and t
(*args: t.Any, **kwargs: t.Any)
| 1201 | |
| 1202 | |
| 1203 | def create_environ(*args: t.Any, **kwargs: t.Any) -> WSGIEnvironment: |
| 1204 | """Create a new WSGI environ dict based on the values passed. The first |
| 1205 | parameter should be the path of the request which defaults to '/'. The |
| 1206 | second one can either be an absolute path (in that case the host is |
| 1207 | localhost:80) or a full path to the request with scheme, netloc port and |
| 1208 | the path to the script. |
| 1209 | |
| 1210 | This accepts the same arguments as the :class:`EnvironBuilder` |
| 1211 | constructor. |
| 1212 | |
| 1213 | .. versionchanged:: 0.5 |
| 1214 | This function is now a thin wrapper over :class:`EnvironBuilder` which |
| 1215 | was added in 0.5. The `headers`, `environ_base`, `environ_overrides` |
| 1216 | and `charset` parameters were added. |
| 1217 | """ |
| 1218 | builder = EnvironBuilder(*args, **kwargs) |
| 1219 | |
| 1220 | try: |
| 1221 | return builder.get_environ() |
| 1222 | finally: |
| 1223 | builder.close() |
| 1224 | |
| 1225 | |
| 1226 | def run_wsgi_app( |
no test coverage detected