Class URIResponse
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.webprocessextension.URIResponse
- All Implemented Interfaces:
Proxy
Represents an URI response.
A WebKitURIResponse contains information such as the URI, the
status code, the content length, the mime type, the HTTP status or
the suggested filename.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classURIResponse.Builder<B extends URIResponse.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new URIResponse.URIResponse(MemorySegment address) Create a URIResponse instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected URIResponseasParent()Return this instance as if it were its parent type.static URIResponse.Builder<? extends URIResponse.Builder> builder()AURIResponse.Builderobject constructs aURIResponsewith the specified properties.longGet the expected content length of theWebKitURIResponse.Get the HTTP headers of aWebKitURIResponseas aSoupMessageHeaders.static MemoryLayoutThe memory layout of the native struct.Gets the MIME type of the response.intGet the status code of theWebKitURIResponse.Get the suggested filename forresponse.static @Nullable TypegetType()Get the GType of the URIResponse class.getUri()Gets the URI which resulted in the response.Methods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
URIResponse
Create a URIResponse instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
URIResponse
public URIResponse()Create a new URIResponse.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
getContentLength
public long getContentLength()Get the expected content length of the
WebKitURIResponse.It can be 0 if the server provided an incorrect or missing Content-Length.
- Returns:
- the expected content length of
response.
-
getHttpHeaders
Get the HTTP headers of aWebKitURIResponseas aSoupMessageHeaders.- Returns:
- a
SoupMessageHeaderswith the HTTP headers of this URIResponse ornullif this URIResponse is not an HTTP response. - Since:
- 2.6
-
getMimeType
-
getStatusCode
public int getStatusCode()Get the status code of the
WebKitURIResponse.Get the status code of the
WebKitURIResponseas returned by the server. It will normally be aSoupKnownStatusCode, for exampleStatus.OK, though the server can respond with any unsigned integer.- Returns:
- the status code of this URIResponse
-
getSuggestedFilename
Get the suggested filename for
response.Get the suggested filename for
response,as specified by the 'Content-Disposition' HTTP header, ornullif it's not present.- Returns:
- the suggested filename or
nullif the 'Content-Disposition' HTTP header is not present.
-
getUri
Gets the URI which resulted in the response.- Returns:
- response URI, as a string.
-
builder
AURIResponse.Builderobject constructs aURIResponsewith the specified properties. Use the variousset...()methods to set properties, and finish construction withURIResponse.Builder.build().- Returns:
- the builder object
-