Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions blacksheep/docs/behind-proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ sequenceDiagram
Proxy-->>User: HTTP 404 Not Found
```

/// details | The example of API Gateway
/// details | The example of API Gateways
type: info

API Gateways like [AWS API Gateway](https://docs.aws.amazon.com/prescriptive-guidance/latest/cloud-design-patterns/api-routing-path.html)
Expand All @@ -132,13 +132,13 @@ implementing interactive sign-in.
(applying URL rewrite).
- The second approach involves configuring a prefix in the application router
to globally change the prefix of all request handlers. The global prefix can
also be set using the environment variable `APP_ROUTE_PREFIX`. This method
assumes that modifying the path handled by the web server is desirable to
align it with the path handled by the HTTP proxy server, and it is ideal
when using URL rewrite is not easy.
be set when instantiating the `Router` or using the environment variable
`APP_ROUTE_PREFIX`. This method assumes that modifying the path handled by
the web server is desirable to align it with the path handled by the HTTP
proxy server, and it is ideal when applying URL rewrite is not easy.

For both options, `BlackSheep` handles the information provided by `root_path`
or the application router prefix in some specific ways.
and the application router prefix in some specific ways.
For example, the `get_absolute_url_to_path` defined in `blacksheep.messages`
will handle the information and return an absolute URL to the server
according to both scenarios.
Expand Down
16 changes: 7 additions & 9 deletions blacksheep/docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ BlackSheep includes an implementation of HTTP Client for HTTP 1.1.

## Client features

- HTTP connection pooling
- User-friendly handling of SSL contexts (safe by default)
- Support for client side middlewares
- HTTP connection pooling.
- User-friendly handling of SSL contexts (safe by default).
- Support for client side middlewares.
- Automatic handling of redirects (can be disabled, validates circular
redirects and maximum number of redirects - redirects to URN are simply
returned to code using the client)
returned to code using the client).
- Automatic handling of cookies (can be disabled, `Set-Cookie` and `Cookie`
headers)
headers).

**Example:**

```python
import asyncio
from blacksheep.client import ClientSession
Expand All @@ -30,7 +31,6 @@ async def client_example(loop):

loop = asyncio.get_event_loop()
loop.run_until_complete(client_example(loop))

```

## HTTP Connection pooling
Expand Down Expand Up @@ -59,7 +59,6 @@ design pattern, and this is supported in BlackSheep.

```python
async def client_example_middleware(request, next_handler):

# do something before the request is sent
response = await next_handler(request)

Expand All @@ -86,7 +85,6 @@ if it was created for the client.
It is recommended to instantiate a single instance of HTTP client and
register it as a service of the application, using the `@app.lifespan` method:

```python
```python
from blacksheep import Application
from blacksheep.client.session import ClientSession
Expand All @@ -111,5 +109,5 @@ async def home(http_client: ClientSession):
```

When following this approach, the HTTP client can be automatically injected
into request handlers, and services that need it, and is automatically disposed
into request handlers and services that need it, and is automatically disposed
of when the application is stopped.
16 changes: 0 additions & 16 deletions blacksheep/docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@ html {
overflow-y: scroll;
}

/* For large screens, make better use of the horizontal space */
@media screen and (min-width: 2000px) {
.md-grid {
max-width: 98%;
}

.md-sidebar {
width: auto;
min-width: 15%;
}

body.fullscreen #fullscreen-form label {
display: none !important;
}
}

@media screen and (min-width: 1000px) {
html.fullscreen {
.md-grid {
Expand Down
5 changes: 1 addition & 4 deletions blacksheep/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ extra_javascript:

plugins:
- search
- neoteroi.contribs:
contributors:
- email: roberto.prevato@gmail.com
image: https://avatars.githubusercontent.com/u/2576032?s=400&u=d8d880e8ed05bb170877dd3d561d8301c4beeeed&v=4
- neoteroi.contribs

markdown_extensions:
- admonition
Expand Down
8 changes: 8 additions & 0 deletions mkdocs-plugins/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# MkDocs Plugins docs 📜

[www.neoteroi.dev](https://www.neoteroi.dev/mkdocs-plugins/).

## Additional contributors

This section lists contributors from the [previous repository](https://github.com/Neoteroi/mkdocs-plugins-docs),
before the code was transferred here.

- [@SerTetora](https://github.com/Neoteroi/mkdocs-plugins-docs/commits?author=SerTetora)
- [@yasamoka](https://github.com/Neoteroi/mkdocs-plugins-docs/commits?author=yasamoka)
2 changes: 1 addition & 1 deletion mkdocs-plugins/docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## The project's home
The project source code is in [GitHub](https://github.com/Neoteroi/mkdocs-plugins).

The documentation source code is in [GitHub](https://github.com/Neoteroi/mkdocs-plugins-docs).
The documentation source code is here in [GitHub](https://github.com/Neoteroi/neoteroi.github.io).
5 changes: 1 addition & 4 deletions mkdocs-plugins/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ extra_css:

plugins:
- search
- neoteroi.contribs:
contributors:
- email: roberto.prevato@gmail.com
image: https://avatars.githubusercontent.com/u/2576032?s=400&u=d8d880e8ed05bb170877dd3d561d8301c4beeeed&v=4
- neoteroi.contribs

markdown_extensions:
- admonition
Expand Down