| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.OAuth.OAuth2.HttpClient
Contents
Description
A simple http client to request OAuth2 tokens and several utils.
Synopsis
- authGetJSON :: FromJSON b => Manager -> AccessToken -> URI -> ExceptT ByteString IO b
- authGetBS :: Manager -> AccessToken -> URI -> ExceptT ByteString IO ByteString
- authGetBS2 :: Manager -> AccessToken -> URI -> ExceptT ByteString IO ByteString
- authGetJSONInternal :: FromJSON b => Set APIAuthenticationMethod -> Manager -> AccessToken -> URI -> ExceptT ByteString IO b
- authGetBSInternal :: Set APIAuthenticationMethod -> Manager -> AccessToken -> URI -> ExceptT ByteString IO ByteString
- authPostJSON :: FromJSON b => Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO b
- authPostBS :: Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO ByteString
- authPostBS1 :: Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO ByteString
- authPostBS2 :: Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO ByteString
- authPostBS3 :: Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO ByteString
- authPostJSONInternal :: FromJSON a => Set APIAuthenticationMethod -> Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO a
- authPostBSInternal :: Set APIAuthenticationMethod -> Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString IO ByteString
AUTH requests
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.
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.
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
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.
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.
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.
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)
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.
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.
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
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.
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.