Class HTTPRequest
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.remoteviz.rendering.HTTPRequest
- All Implemented Interfaces:
Cloneable
This class encapsulates an HTTP request message received by the service.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a GET / HTTP/1.1 HTTP request.HTTPRequest
(HTTPRequest obj) Copy constructor.HTTPRequest
(String method, String uri, int versionMajor, int versionMinor) Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version.HTTPRequest
(String method, String uri, int versionMajor, int versionMinor, HTTPHeaders headers) Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers. -
Method Summary
Modifier and TypeMethodDescriptionclone()
long
Returns the value of the Content-Length header field.Returns the value of the Content-Type header field.Returns HTTP headers.getHost()
Returns the value of the Host header field.Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH").getURI()
Returns the URI (Uniform Resource Identifier) being requested.Returns the HTTP version for incoming request (example "HTTP/1.1").int
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.int
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.void
setValue
(HTTPRequest copyFrom) static HTTPRequest[]
toArray
(long nativeArray, long length) Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
HTTPRequest
public HTTPRequest()Creates a GET / HTTP/1.1 HTTP request. -
HTTPRequest
Copy constructor. -
HTTPRequest
Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version. -
HTTPRequest
public HTTPRequest(String method, String uri, int versionMajor, int versionMinor, HTTPHeaders headers) Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers.
-
-
Method Details
-
clone
-
getURI
Returns the URI (Uniform Resource Identifier) being requested. -
setValue
-
getContentType
Returns the value of the Content-Type header field. -
toArray
-
getVersion
Returns the HTTP version for incoming request (example "HTTP/1.1"). -
getMethod
Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH"). -
getHeaders
Returns HTTP headers. -
getHost
Returns the value of the Host header field. -
getContentLength
public long getContentLength()Returns the value of the Content-Length header field. The value -1 indicates that the length is unknown (Content-Length header is not present). -
getVersionMinor
public int getVersionMinor()HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. Returns the version minor. -
getVersionMajor
public int getVersionMajor()HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. Returns the version major.
-