Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data CacheType
- data CookieJarAcceptPolicy
- data DateFormat
- data Encoding
- data HTTPVersion
- data LoggerLogLevel
- data MemoryUse
- data MessageHeadersType
- data MessagePriority
- data SameSitePolicy
- data SessionError
- catchSessionError :: IO a -> (SessionError -> GErrorMessage -> IO a) -> IO a
- handleSessionError :: (SessionError -> GErrorMessage -> IO a) -> IO a -> IO a
- data Status
- = StatusNone
- | StatusContinue
- | StatusSwitchingProtocols
- | StatusProcessing
- | StatusOk
- | StatusCreated
- | StatusAccepted
- | StatusNonAuthoritative
- | StatusNoContent
- | StatusResetContent
- | StatusPartialContent
- | StatusMultiStatus
- | StatusMultipleChoices
- | StatusMovedPermanently
- | StatusFound
- | StatusMovedTemporarily
- | StatusSeeOther
- | StatusNotModified
- | StatusUseProxy
- | StatusNotAppearingInThisProtocol
- | StatusTemporaryRedirect
- | StatusPermanentRedirect
- | StatusBadRequest
- | StatusUnauthorized
- | StatusPaymentRequired
- | StatusForbidden
- | StatusNotFound
- | StatusMethodNotAllowed
- | StatusNotAcceptable
- | StatusProxyAuthenticationRequired
- | StatusProxyUnauthorized
- | StatusRequestTimeout
- | StatusConflict
- | StatusGone
- | StatusLengthRequired
- | StatusPreconditionFailed
- | StatusRequestEntityTooLarge
- | StatusRequestUriTooLong
- | StatusUnsupportedMediaType
- | StatusRequestedRangeNotSatisfiable
- | StatusInvalidRange
- | StatusExpectationFailed
- | StatusMisdirectedRequest
- | StatusUnprocessableEntity
- | StatusLocked
- | StatusFailedDependency
- | StatusInternalServerError
- | StatusNotImplemented
- | StatusBadGateway
- | StatusServiceUnavailable
- | StatusGatewayTimeout
- | StatusHttpVersionNotSupported
- | StatusInsufficientStorage
- | StatusNotExtended
- | AnotherStatus Int
- data TLDError
- catchTLDError :: IO a -> (TLDError -> GErrorMessage -> IO a) -> IO a
- handleTLDError :: (TLDError -> GErrorMessage -> IO a) -> IO a -> IO a
- data URIComponent
- data WebsocketCloseCode
- = WebsocketCloseCodeNormal
- | WebsocketCloseCodeGoingAway
- | WebsocketCloseCodeProtocolError
- | WebsocketCloseCodeUnsupportedData
- | WebsocketCloseCodeNoStatus
- | WebsocketCloseCodeAbnormal
- | WebsocketCloseCodeBadData
- | WebsocketCloseCodePolicyViolation
- | WebsocketCloseCodeTooBig
- | WebsocketCloseCodeNoExtension
- | WebsocketCloseCodeServerError
- | WebsocketCloseCodeTlsHandshake
- | AnotherWebsocketCloseCode Int
- data WebsocketConnectionType
- data WebsocketDataType
- data WebsocketError
- catchWebsocketError :: IO a -> (WebsocketError -> GErrorMessage -> IO a) -> IO a
- handleWebsocketError :: (WebsocketError -> GErrorMessage -> IO a) -> IO a -> IO a
- data WebsocketState
Enumerations
CacheType
The type of cache; this affects what kinds of responses will be saved.
CacheTypeSingleUser | a single-user cache |
CacheTypeShared | a shared cache |
AnotherCacheType Int | Catch-all for unknown values |
Instances
Enum CacheType Source # | |
Defined in GI.Soup.Enums succ :: CacheType -> CacheType # pred :: CacheType -> CacheType # fromEnum :: CacheType -> Int # enumFrom :: CacheType -> [CacheType] # enumFromThen :: CacheType -> CacheType -> [CacheType] # enumFromTo :: CacheType -> CacheType -> [CacheType] # enumFromThenTo :: CacheType -> CacheType -> CacheType -> [CacheType] # | |
Show CacheType Source # | |
Eq CacheType Source # | |
Ord CacheType Source # | |
Defined in GI.Soup.Enums | |
BoxedEnum CacheType Source # | |
Defined in GI.Soup.Enums | |
TypedObject CacheType Source # | |
Defined in GI.Soup.Enums | |
HasParentTypes CacheType Source # | |
Defined in GI.Soup.Enums | |
type ParentTypes CacheType Source # | |
Defined in GI.Soup.Enums |
CookieJarAcceptPolicy
data CookieJarAcceptPolicy Source #
The policy for accepting or rejecting cookies returned in responses.
CookieJarAcceptPolicyAlways | accept all cookies unconditionally. |
CookieJarAcceptPolicyNever | reject all cookies unconditionally. |
CookieJarAcceptPolicyNoThirdParty | accept all cookies set by the main
document loaded in the application using libsoup. An example of the most
common case, web browsers, would be: If http://www.example.com is the page
loaded, accept all cookies set by example.com, but if a resource from
http://www.third-party.com is loaded from that page reject any cookie that
it could try to set. For libsoup to be able to tell apart first party
cookies from the rest, the application must call
[method |
CookieJarAcceptPolicyGrandfatheredThirdParty | accept all cookies set by
the main document loaded in the application using libsoup, and from domains
that have previously set at least one cookie when loaded as the main
document. An example of the most common case, web browsers, would be: if
http://www.example.com is the page loaded, accept all cookies set by
example.com, but if a resource from http://www.third-party.com is loaded
from that page, reject any cookie that it could try to set unless it
already has a cookie in the cookie jar. For libsoup to be able to tell
apart first party cookies from the rest, the application must call
[method |
AnotherCookieJarAcceptPolicy Int | Catch-all for unknown values |
Instances
DateFormat
data DateFormat Source #
Date formats that [funcdateTimeToString
] can use.
sOUPDATEHTTP
and sOUPDATECOOKIE
always coerce the time to
UTC.
This enum may be extended with more values in future releases.
DateFormatHttp | RFC 1123 format, used by the HTTP "Date" header. Eg "Sun, 06 Nov 1994 08:49:37 GMT". |
DateFormatCookie | The format for the "Expires" timestamp in the Netscape cookie specification. Eg, "Sun, 06-Nov-1994 08:49:37 GMT". |
AnotherDateFormat Int | Catch-all for unknown values |
Instances
Encoding
How a message body is encoded for transport
EncodingUnrecognized | unknown / error |
EncodingNone | no body is present (which is not the same as a 0-length body, and only occurs in certain places) |
EncodingContentLength | Content-Length encoding |
EncodingEof | Response body ends when the connection is closed |
EncodingChunked | chunked encoding (currently only supported for response) |
EncodingByteranges | multipart/byteranges (Reserved for future use: NOT CURRENTLY IMPLEMENTED) |
AnotherEncoding Int | Catch-all for unknown values |
Instances
Enum Encoding Source # | |
Show Encoding Source # | |
Eq Encoding Source # | |
Ord Encoding Source # | |
Defined in GI.Soup.Enums | |
BoxedEnum Encoding Source # | |
Defined in GI.Soup.Enums | |
TypedObject Encoding Source # | |
Defined in GI.Soup.Enums | |
HasParentTypes Encoding Source # | |
Defined in GI.Soup.Enums | |
type ParentTypes Encoding Source # | |
Defined in GI.Soup.Enums |
HTTPVersion
data HTTPVersion Source #
Indicates the HTTP protocol version being used.
HTTPVersionHttp10 | HTTP 1.0 (RFC 1945) |
HTTPVersionHttp11 | HTTP 1.1 (RFC 2616) |
HTTPVersionHttp20 | HTTP 2.0 (RFC 7540) |
AnotherHTTPVersion Int | Catch-all for unknown values |
Instances
LoggerLogLevel
data LoggerLogLevel Source #
Describes the level of logging output to provide.
LoggerLogLevelNone | No logging |
LoggerLogLevelMinimal | Log the Request-Line or Status-Line and the Soup-Debug pseudo-headers |
LoggerLogLevelHeaders | Log the full request/response headers |
LoggerLogLevelBody | Log the full headers and request/response bodies |
AnotherLoggerLogLevel Int | Catch-all for unknown values |
Instances
MemoryUse
The lifetime of the memory being passed.
MemoryUseStatic | The memory is statically allocated and constant; libsoup can use the passed-in buffer directly and not need to worry about it being modified or freed. |
MemoryUseTake | The caller has allocated the memory and libsoup
will assume ownership of it and free it with |
MemoryUseCopy | The passed-in data belongs to the caller and libsoup will copy it into new memory leaving the caller free to reuse the original memory. |
AnotherMemoryUse Int | Catch-all for unknown values |
Instances
Enum MemoryUse Source # | |
Defined in GI.Soup.Enums succ :: MemoryUse -> MemoryUse # pred :: MemoryUse -> MemoryUse # fromEnum :: MemoryUse -> Int # enumFrom :: MemoryUse -> [MemoryUse] # enumFromThen :: MemoryUse -> MemoryUse -> [MemoryUse] # enumFromTo :: MemoryUse -> MemoryUse -> [MemoryUse] # enumFromThenTo :: MemoryUse -> MemoryUse -> MemoryUse -> [MemoryUse] # | |
Show MemoryUse Source # | |
Eq MemoryUse Source # | |
Ord MemoryUse Source # | |
Defined in GI.Soup.Enums | |
BoxedEnum MemoryUse Source # | |
Defined in GI.Soup.Enums | |
TypedObject MemoryUse Source # | |
Defined in GI.Soup.Enums | |
HasParentTypes MemoryUse Source # | |
Defined in GI.Soup.Enums | |
type ParentTypes MemoryUse Source # | |
Defined in GI.Soup.Enums |
MessageHeadersType
data MessageHeadersType Source #
Value passed to [ctormessageHeaders
.new] to set certain default
behaviors.
MessageHeadersTypeRequest | request headers |
MessageHeadersTypeResponse | response headers |
MessageHeadersTypeMultipart | multipart body part headers |
AnotherMessageHeadersType Int | Catch-all for unknown values |
Instances
MessagePriority
data MessagePriority Source #
Priorities that can be set on a [classmessage
] to instruct the message queue
to process it before any other message with lower priority.
MessagePriorityVeryLow | The lowest priority, the messages with this priority will be the last ones to be attended. |
MessagePriorityLow | Use this for low priority messages, a
|
MessagePriorityNormal | The default priotity, this is the
priority assigned to the |
MessagePriorityHigh | High priority, a |
MessagePriorityVeryHigh | The highest priority, use this
for very urgent |
AnotherMessagePriority Int | Catch-all for unknown values |
Instances
SameSitePolicy
data SameSitePolicy Source #
Represents the same-site policies of a cookie.
SameSitePolicyNone | The cookie is exposed with both cross-site and same-site requests |
SameSitePolicyLax | The cookie is withheld on cross-site requests but exposed on cross-site navigations |
SameSitePolicyStrict | The cookie is only exposed for same-site requests |
AnotherSameSitePolicy Int | Catch-all for unknown values |
Instances
SessionError
data SessionError Source #
A Session
error.
SessionErrorParsing | the server's response could not be parsed |
SessionErrorEncoding | the server's response was in an unsupported format |
SessionErrorTooManyRedirects | the message has been redirected too many times |
SessionErrorTooManyRestarts | the message has been restarted too many times |
SessionErrorRedirectNoLocation | failed to redirect message because Location header was missing or empty in response |
SessionErrorRedirectBadUri | failed to redirect message because Location header contains an invalid URI |
SessionErrorMessageAlreadyInQueue | the message is already in the session queue. Messages can only be reused after unqueued. |
AnotherSessionError Int | Catch-all for unknown values |
Instances
catchSessionError :: IO a -> (SessionError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type SessionError
. This is a specialized version of catchGErrorJustDomain
.
handleSessionError :: (SessionError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type SessionError
. This is a specialized version of handleGErrorJustDomain
.
Status
These represent the known HTTP status code values, plus various network and internal errors.
Note that no libsoup functions take or return this type directly; any function that works with status codes will accept unrecognized status codes as well.
StatusNone | No status available. (Eg, the message has not been sent yet) |
StatusContinue | 100 Continue (HTTP) |
StatusSwitchingProtocols | 101 Switching Protocols (HTTP) |
StatusProcessing | 102 Processing (WebDAV) |
StatusOk | 200 Success (HTTP). Also used by many lower-level soup routines to indicate success. |
StatusCreated | 201 Created (HTTP) |
StatusAccepted | 202 Accepted (HTTP) |
StatusNonAuthoritative | 203 Non-Authoritative Information (HTTP) |
StatusNoContent | 204 No Content (HTTP) |
StatusResetContent | 205 Reset Content (HTTP) |
StatusPartialContent | 206 Partial Content (HTTP) |
StatusMultiStatus | 207 Multi-Status (WebDAV) |
StatusMultipleChoices | 300 Multiple Choices (HTTP) |
StatusMovedPermanently | 301 Moved Permanently (HTTP) |
StatusFound | 302 Found (HTTP) |
StatusMovedTemporarily | 302 Moved Temporarily (old name, RFC 2068) |
StatusSeeOther | 303 See Other (HTTP) |
StatusNotModified | 304 Not Modified (HTTP) |
StatusUseProxy | 305 Use Proxy (HTTP) |
StatusNotAppearingInThisProtocol | 306 Unused |
StatusTemporaryRedirect | 307 Temporary Redirect (HTTP) |
StatusPermanentRedirect | 308 Permanent Redirect (HTTP) |
StatusBadRequest | 400 Bad Request (HTTP) |
StatusUnauthorized | 401 Unauthorized (HTTP) |
StatusPaymentRequired | 402 Payment Required (HTTP) |
StatusForbidden | 403 Forbidden (HTTP) |
StatusNotFound | 404 Not Found (HTTP) |
StatusMethodNotAllowed | 405 Method Not Allowed (HTTP) |
StatusNotAcceptable | 406 Not Acceptable (HTTP) |
StatusProxyAuthenticationRequired | 407 Proxy Authentication Required (HTTP) |
StatusProxyUnauthorized | shorter alias for
|
StatusRequestTimeout | 408 Request Timeout (HTTP) |
StatusConflict | 409 Conflict (HTTP) |
StatusGone | 410 Gone (HTTP) |
StatusLengthRequired | 411 Length Required (HTTP) |
StatusPreconditionFailed | 412 Precondition Failed (HTTP) |
StatusRequestEntityTooLarge | 413 Request Entity Too Large (HTTP) |
StatusRequestUriTooLong | 414 Request-URI Too Long (HTTP) |
StatusUnsupportedMediaType | 415 Unsupported Media Type (HTTP) |
StatusRequestedRangeNotSatisfiable | 416 Requested Range Not Satisfiable (HTTP) |
StatusInvalidRange | shorter alias for
|
StatusExpectationFailed | 417 Expectation Failed (HTTP) |
StatusMisdirectedRequest | 421 Misdirected Request |
StatusUnprocessableEntity | 422 Unprocessable Entity (WebDAV) |
StatusLocked | 423 Locked (WebDAV) |
StatusFailedDependency | 424 Failed Dependency (WebDAV) |
StatusInternalServerError | 500 Internal Server Error (HTTP) |
StatusNotImplemented | 501 Not Implemented (HTTP) |
StatusBadGateway | 502 Bad Gateway (HTTP) |
StatusServiceUnavailable | 503 Service Unavailable (HTTP) |
StatusGatewayTimeout | 504 Gateway Timeout (HTTP) |
StatusHttpVersionNotSupported | 505 HTTP Version Not Supported (HTTP) |
StatusInsufficientStorage | 507 Insufficient Storage (WebDAV) |
StatusNotExtended | 510 Not Extended (RFC 2774) |
AnotherStatus Int | Catch-all for unknown values |
Instances
Enum Status Source # | |
Defined in GI.Soup.Enums | |
Show Status Source # | |
Eq Status Source # | |
Ord Status Source # | |
BoxedEnum Status Source # | |
Defined in GI.Soup.Enums | |
TypedObject Status Source # | |
Defined in GI.Soup.Enums | |
HasParentTypes Status Source # | |
Defined in GI.Soup.Enums | |
type ParentTypes Status Source # | |
Defined in GI.Soup.Enums |
TLDError
Error codes for SOUP_TLD_ERROR
.
TLDErrorInvalidHostname | A hostname was syntactically invalid. |
TLDErrorIsIpAddress | The passed-in "hostname" was actually an IP address (and thus has no base domain or public suffix). |
TLDErrorNotEnoughDomains | The passed-in hostname
did not have enough components. Eg, calling
[func |
TLDErrorNoBaseDomain | The passed-in hostname has no recognized public suffix. |
TLDErrorNoPslData | The Public Suffix List was not available. |
AnotherTLDError Int | Catch-all for unknown values |
Instances
Enum TLDError Source # | |
Show TLDError Source # | |
Eq TLDError Source # | |
Ord TLDError Source # | |
Defined in GI.Soup.Enums | |
BoxedEnum TLDError Source # | |
Defined in GI.Soup.Enums | |
TypedObject TLDError Source # | |
Defined in GI.Soup.Enums | |
GErrorClass TLDError Source # | |
Defined in GI.Soup.Enums gerrorClassDomain :: TLDError -> Text | |
HasParentTypes TLDError Source # | |
Defined in GI.Soup.Enums | |
type ParentTypes TLDError Source # | |
Defined in GI.Soup.Enums |
catchTLDError :: IO a -> (TLDError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type TLDError
. This is a specialized version of catchGErrorJustDomain
.
handleTLDError :: (TLDError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type TLDError
. This is a specialized version of handleGErrorJustDomain
.
URIComponent
data URIComponent Source #
Enum values passed to [funcuriCopy
] to indicate the components of
the URI that should be updated with the given values.
URIComponentNone | no component |
URIComponentScheme | the URI scheme component |
URIComponentUser | the URI user component |
URIComponentPassword | the URI password component |
URIComponentAuthParams | the URI authentication parameters component |
URIComponentHost | the URI host component |
URIComponentPort | the URI port component |
URIComponentPath | the URI path component |
URIComponentQuery | the URI query component |
URIComponentFragment | the URI fragment component |
AnotherURIComponent Int | Catch-all for unknown values |
Instances
WebsocketCloseCode
data WebsocketCloseCode Source #
Pre-defined close codes that can be passed to
[methodwebsocketConnection
.close] or received from
[methodwebsocketConnection
.get_close_code].
However, other codes are also allowed.
WebsocketCloseCodeNormal | a normal, non-error close |
WebsocketCloseCodeGoingAway | the client/server is going away |
WebsocketCloseCodeProtocolError | a protocol error occurred |
WebsocketCloseCodeUnsupportedData | the endpoint received data of a type that it does not support. |
WebsocketCloseCodeNoStatus | reserved value indicating that no close code was present; must not be sent. |
WebsocketCloseCodeAbnormal | reserved value indicating that the connection was closed abnormally; must not be sent. |
WebsocketCloseCodeBadData | the endpoint received data that was invalid (eg, non-UTF-8 data in a text message). |
WebsocketCloseCodePolicyViolation | generic error code indicating some sort of policy violation. |
WebsocketCloseCodeTooBig | the endpoint received a message that is too big to process. |
WebsocketCloseCodeNoExtension | the client is closing the connection because the server failed to negotiate a required extension. |
WebsocketCloseCodeServerError | the server is closing the connection because it was unable to fulfill the request. |
WebsocketCloseCodeTlsHandshake | reserved value indicating that the TLS handshake failed; must not be sent. |
AnotherWebsocketCloseCode Int | Catch-all for unknown values |
Instances
WebsocketConnectionType
data WebsocketConnectionType Source #
The type of a [classwebsocketConnection
].
WebsocketConnectionTypeUnknown | unknown/invalid connection |
WebsocketConnectionTypeClient | a client-side connection |
WebsocketConnectionTypeServer | a server-side connection |
AnotherWebsocketConnectionType Int | Catch-all for unknown values |
Instances
WebsocketDataType
data WebsocketDataType Source #
The type of data contained in a signalwebsocketConnection
[message] signal.
WebsocketDataTypeText | UTF-8 text |
WebsocketDataTypeBinary | binary data |
AnotherWebsocketDataType Int | Catch-all for unknown values |
Instances
WebsocketError
data WebsocketError Source #
WebSocket-related errors.
WebsocketErrorFailed | a generic error |
WebsocketErrorNotWebsocket | attempted to handshake with a server that does not appear to understand WebSockets. |
WebsocketErrorBadHandshake | the WebSocket handshake failed because some detail was invalid (eg, incorrect accept key). |
WebsocketErrorBadOrigin | the WebSocket handshake failed because the "Origin" header was not an allowed value. |
AnotherWebsocketError Int | Catch-all for unknown values |
Instances
catchWebsocketError :: IO a -> (WebsocketError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type WebsocketError
. This is a specialized version of catchGErrorJustDomain
.
handleWebsocketError :: (WebsocketError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type WebsocketError
. This is a specialized version of handleGErrorJustDomain
.
WebsocketState
data WebsocketState Source #
The state of the WebSocket connection.
WebsocketStateOpen | the connection is ready to send messages |
WebsocketStateClosing | the connection is in the process of closing down; messages may be received, but not sent |
WebsocketStateClosed | the connection is completely closed down |
AnotherWebsocketState Int | Catch-all for unknown values |