hoauth2-2.5.0: Haskell OAuth2 authentication client
Safe HaskellNone
LanguageHaskell2010

Network.OAuth.OAuth2.HttpClient

Description

A simple http client to request OAuth2 tokens and several utils.

Synopsis

AUTH requests

authGetJSON Source #

Arguments

:: FromJSON b 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString IO b

Response as JSON

Deprecated: use authGetJSONInternal

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

authGetBS Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString IO ByteString

Response as ByteString

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

authGetBS2 Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString IO ByteString

Response as ByteString

Deprecated: use authGetBSInternal

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

authGetJSONInternal Source #

Arguments

:: FromJSON b 
=> Set APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString IO b

Response as JSON

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

authGetBSInternal Source #

Arguments

:: Set APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> ExceptT ByteString IO ByteString

Response as ByteString

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

authPostJSON Source #

Arguments

:: FromJSON b 
=> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO b

Response as JSON

Deprecated: use authPostJSONInternal

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

authPostBS Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO ByteString

Response as ByteString

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

authPostBS1 Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO ByteString

Response as ByteString

Deprecated: use authPostBSInternal

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

authPostBS2 Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO ByteString

Response as ByteString

Deprecated: use authPostBSInternal

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

authPostBS3 Source #

Arguments

:: Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO ByteString

Response as ByteString

Deprecated: use authPostBSInternal

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

authPostJSONInternal Source #

Arguments

:: FromJSON a 
=> Set APIAuthenticationMethod 
-> Manager

HTTP connection manager.

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

Response as ByteString

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

authPostBSInternal Source #

Arguments

:: Set APIAuthenticationMethod 
-> Manager

HTTP connection manager.

-> AccessToken 
-> URI 
-> PostBody 
-> ExceptT ByteString IO ByteString

Response as ByteString

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