hoauth2-2.15.0: Haskell OAuth2 authentication client
Safe HaskellNone
LanguageHaskell2010

Network.OAuth2.HttpClient

Description

Bindings for The OAuth 2.0 Authorization Framework: Bearer Token Usage RFC6750 https://www.rfc-editor.org/rfc/rfc6750

Synopsis

AUTH requests

authGetJSON Source #

Arguments

:: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString m a

Response as JSON

Conduct an authorized GET request and return response as JSON. Inject Access Token to Authorization Header.

authGetBS Source #

Arguments

:: forall (m :: Type -> Type). MonadIO m 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString m ByteString

Response as ByteString

Conduct an authorized GET request. Inject Access Token to Authorization Header.

authGetJSONWithAuthMethod Source #

Arguments

:: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) 
=> APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString m a

Response as JSON

Conduct an authorized GET request and return response as JSON. Allow to specify how to append AccessToken.

Since: 2.6.0

authGetBSWithAuthMethod Source #

Arguments

:: forall (m :: Type -> Type). MonadIO m 
=> APIAuthenticationMethod

Specify the way that how to append the AccessToken in the request

-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString m ByteString

Response as ByteString

Conduct an authorized GET request and return response as ByteString. Allow to specify how to append AccessToken.

Since: 2.6.0

authPostJSON Source #

Arguments

:: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString m a

Response as JSON

Conduct POST request and return response as JSON. Inject Access Token to Authorization Header.

authPostBS Source #

Arguments

:: forall (m :: Type -> Type). MonadIO m 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString m ByteString

Response as ByteString

Conduct POST request. Inject Access Token to http header (Authorization)

authPostJSONWithAuthMethod Source #

Arguments

:: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) 
=> APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString m a

Response as ByteString

Conduct POST request and return response as JSON. Allow to specify how to append AccessToken.

Since: 2.6.0

authPostBSWithAuthMethod Source #

Arguments

:: forall (m :: Type -> Type). MonadIO m 
=> APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString m ByteString

Response as ByteString

Conduct POST request and return response as ByteString. Allow to specify how to append AccessToken.

Since: 2.6.0

Types