hoauth2-2.14.0: Haskell OAuth2 authentication client
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.OAuth.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

:: (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

:: 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.

authGetBS2 Source #

Arguments

:: MonadIO m 
=> Manager

HTTP connection manager.

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

Response as ByteString

Deprecated: use authGetBSWithAuthMethod

Same to authGetBS but set access token to query parameter rather than header

authGetJSONWithAuthMethod Source #

Arguments

:: (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

authGetJSONInternal Source #

Arguments

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

HTTP connection manager.

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

Response as JSON

Deprecated: use authGetJSONWithAuthMethod

Deprecated. Use authGetJSONWithAuthMethod instead.

authGetBSWithAuthMethod Source #

Arguments

:: 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

authGetBSInternal Source #

Arguments

:: MonadIO m 
=> APIAuthenticationMethod 
-> Manager

HTTP connection manager.

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

Response as ByteString

Deprecated: use authGetBSWithAuthMethod

authPostJSON Source #

Arguments

:: (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

:: 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)

authPostBS2 Source #

Arguments

:: MonadIO m 
=> Manager

HTTP connection manager.

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

Response as ByteString

Deprecated: use authPostBSWithAuthMethod

Conduct POST request with access token only in the request body but header.

authPostBS3 Source #

Arguments

:: MonadIO m 
=> Manager

HTTP connection manager.

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

Response as ByteString

Deprecated: use authPostBSWithAuthMethod

Conduct POST request with access token only in the header and not in body

authPostJSONWithAuthMethod Source #

Arguments

:: (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

authPostJSONInternal Source #

Arguments

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

HTTP connection manager.

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

Response as ByteString

authPostBSWithAuthMethod Source #

Arguments

:: 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

authPostBSInternal Source #

Arguments

:: MonadIO m 
=> APIAuthenticationMethod 
-> Manager

HTTP connection manager.

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

Response as ByteString

Deprecated: use authPostBSWithAuthMethod

Types