bovine.clients.bearer
BearerAuthClient
dataclass
Client for using Bearer authentication.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
ClientSession
|
The session |
required |
bearer_key
|
str
|
The bearer key used in the header |
required |
Source code in bovine/bovine/clients/bearer.py
event_source
Returns an EventSource for the server sent events given by url. Accept header is text/event-stream
by default
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The target url |
required |
headers
|
dict
|
additional request headers. |
{}
|
Source code in bovine/bovine/clients/bearer.py
get
async
GET of resource. By default the accept header application/json
is set. You can override this using headers
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The target url |
required |
headers
|
dict
|
additional request headers. |
{}
|
Source code in bovine/bovine/clients/bearer.py
post
async
POST to resource By default the accept header application/json
is set. You can override this using headers
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The target url |
required |
body
|
str
|
The request body |
required |
headers
|
dict
|
additional request headers. |
{}
|
content_type
|
str
|
The content_type of the body |
'application/activity+json'
|