gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.Objects.URISchemeResponse

Description

Represents a URI scheme response.

If you register a particular URI scheme in a WebContext, using webContextRegisterUriScheme, you have to provide a URISchemeRequestCallback. After that, when a URI response is made with that particular scheme, your callback will be called. There you will be able to provide more response parameters when the methods and properties of a URISchemeRequest is not enough.

When you finished setting up your URISchemeResponse, call webkit_uri_request_finish_with_response() with it to return the response.

Synopsis

Exported types

newtype URISchemeResponse Source #

Memory-managed wrapper type.

Constructors

URISchemeResponse (ManagedPtr URISchemeResponse) 

Instances

Instances details
Eq URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

GObject URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

ManagedPtrNewtype URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

TypedObject URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

Methods

glibType :: IO GType

HasParentTypes URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

IsGValue (Maybe URISchemeResponse) Source #

Convert URISchemeResponse to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe URISchemeResponse -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe URISchemeResponse)

type ParentTypes URISchemeResponse Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

type ParentTypes URISchemeResponse = '[Object]

class (GObject o, IsDescendantOf URISchemeResponse o) => IsURISchemeResponse o Source #

Type class for types which can be safely cast to URISchemeResponse, for instance with toURISchemeResponse.

Instances

Instances details
(GObject o, IsDescendantOf URISchemeResponse o) => IsURISchemeResponse o Source # 
Instance details

Defined in GI.WebKit.Objects.URISchemeResponse

toURISchemeResponse :: (MonadIO m, IsURISchemeResponse o) => o -> m URISchemeResponse Source #

Cast to URISchemeResponse, for types for which this is known to be safe. For general casts, use castTo.

Methods

new

uRISchemeResponseNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a) 
=> a

inputStream: a InputStream to read the contents of the request

-> Int64

streamLength: the length of the stream or -1 if not known

-> m URISchemeResponse

Returns: the newly created URISchemeResponse.

Create a new URISchemeResponse

Since: 2.36

setContentType

uRISchemeResponseSetContentType Source #

Arguments

:: (HasCallStack, MonadIO m, IsURISchemeResponse a) 
=> a

response: a URISchemeResponse

-> Text

contentType: the content type of the stream

-> m () 

Sets the content type for the response

Since: 2.36

setHttpHeaders

uRISchemeResponseSetHttpHeaders Source #

Arguments

:: (HasCallStack, MonadIO m, IsURISchemeResponse a) 
=> a

response: a URISchemeResponse

-> MessageHeaders

headers: the HTTP headers to be set

-> m () 

Assign the provided MessageHeaders to the response.

headers need to be of the type MessageHeadersTypeResponse. Any existing headers will be overwritten.

Since: 2.36

setStatus

uRISchemeResponseSetStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsURISchemeResponse a) 
=> a

response: a URISchemeResponse

-> Word32

statusCode: the HTTP status code to be returned

-> Maybe Text

reasonPhrase: a reason phrase

-> m () 

Sets the status code and reason phrase for the response.

If statusCode is a known value and reasonPhrase is Nothing, the reasonPhrase will be set automatically.

Since: 2.36

Properties

stream

The input stream to read from.

Since: 2.36

constructURISchemeResponseStream :: (IsURISchemeResponse o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “stream” property. This is rarely needed directly, but it is used by new.

streamLength

The input stream length in bytes, -1 for unknown length.

Since: 2.36

constructURISchemeResponseStreamLength :: (IsURISchemeResponse o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “stream-length” property. This is rarely needed directly, but it is used by new.