Tom Christie
84f3488f60
Routing for Hosts and Subdomains ( #363 )
...
* Routing for Hosts and Subdomains
* Linting
2019-01-30 15:15:59 +00:00
Taoufik
0c3a1e4a60
f-strings everywhere ( #334 )
...
* f-strings everywhere
2019-01-22 16:24:46 +00:00
Tom Christie
93a124805f
Drop body from responses on HEAD requests ( #317 )
...
* Drop body from responses on HEAD requests
* Linting
* Endpoints supporting HEAD should automatically support GET
2019-01-14 11:07:23 +00:00
Tom Christie
632150d73e
Lifespan as middleware ( #225 )
...
* Lifespan as middleware
* 3.6 compat
* Add annotations
* Handle exceptions from applications within LifespanMiddleware
* Lifespan moves to middleware. TestClient can be used as a context manager.
2018-11-28 11:51:17 +00:00
Tom Christie
9f3dcb7d2b
Rejig ExceptionMiddleware and ServerErrorMiddleware ( #193 )
...
* Rejig ExceptionMiddleware and ServerErrorMiddleware
* Tweak DebugMiddleware implementation
* Support custom 500 handlers
* Exception handling updates
2018-11-08 11:59:15 +00:00
Tom Christie
bcf876c686
Use isort for consistent import ordering ( #156 )
2018-10-29 14:46:42 +00:00
Tom Christie
c047fe4e75
Support app.url_path_for and request.url_for ( #153 )
2018-10-29 11:14:42 +00:00
Tom Christie
8da0f00fe7
Routing interface ( #144 )
...
* Path -> Route, PathPrefix -> Mount
* Route, WebSocketRoute, Mount
* Use Route(endpoint=...), not Route(app=...)
* Bare minimum docs update
* Add url_for
* request.path_params and session.path_params
* Version 0.6.0
2018-10-29 09:22:45 +00:00
Alexander Botello
3ca34ce0a2
Support a routing interface for `Router` ( #143 )
...
* Add a routing interface to Router
* Starlette class now wraps routing functionality from Router
* No need to pass in empty list
* Add missing test coverage
* black that one file i always forget
2018-10-26 10:30:54 +01:00
Alexander Botello
bc26ab3319
Support either `cleanup` or `shutdown` in ASGI lifespan messages ( #134 )
...
* support either cleanup or shutdown in ASGI message
* change event_type in tests
* update docs
* fix typo
* keep as event_type for now
* exclude line 65
* blackify
* replace cleanup with shutdown in docs
2018-10-22 15:08:04 +01:00
Alexander Botello
b0763469ff
Support a function-based interface for adding events on LifespanHandler ( #124 )
...
* Add function interface to lifespanhandler
* function interface accessible added to applications
* Add test for add_event_handler
2018-10-18 08:43:21 +01:00
Tom Christie
6dd6dd6f0a
Add scope=... arguments to Headers, QueryParams, URL ( #118 )
2018-10-17 12:31:53 +01:00
Tom Christie
c50460fbb9
Add final missing annotations, and enable '--disallow-untyped-defs' ( #115 )
...
* fix(dataStructures): missing annotations added
* fix(requests.py): annotations added
* fix(Annotations): wrong annotations fixed on datastructures and requests modules.
* fix(Missing annotation): missing annotations added on testclient module.
* fix(testclient): annotations fixed
* minor tweaks
* fix(testclient): Session request method fixed. WIP _ASGIAdapter send method
* fix(testclient): small tweaks
* Switch on --disallow-untyped-defs when testing with mypy
2018-10-16 15:56:28 +01:00
Tom Christie
19670ae2cd
Middleware ( #82 )
...
* Tweaks to URL datastructure
* Linting
* Add Middleware
2018-10-05 12:04:11 +01:00
Tom Christie
78d1829758
Version 0.3 ( #57 )
...
* Renamings
* Version 0.3.0
* Black formatting
* Update docs for 0.3
2018-09-05 11:39:38 +01:00