mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-20 10:04:08 +00:00
Docs for access tokens
This commit is contained in:
parent
355424c0da
commit
70aa384bc3
5 changed files with 227 additions and 12 deletions
|
@ -87,6 +87,11 @@ func WithBasicAuth(user, pass string) PublishOption {
|
|||
return WithHeader("Authorization", util.BasicAuth(user, pass))
|
||||
}
|
||||
|
||||
// WithBearerAuth adds the Authorization header for Bearer auth to the request
|
||||
func WithBearerAuth(token string) PublishOption {
|
||||
return WithHeader("Authorization", fmt.Sprintf("Bearer %s", token))
|
||||
}
|
||||
|
||||
// WithNoCache instructs the server not to cache the message server-side
|
||||
func WithNoCache() PublishOption {
|
||||
return WithHeader("X-Cache", "no")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue