libgpac
Documentation of the core library of GPAC
|
import"nodejs.idl";
Public Member Functions | |
attribute void | send () |
attribute DOMString body attribute unsigned long | throttle (unsigned long long done, unsigned long long total) |
attribute signed long | read (ArrayBuffer buffer) |
attribute unsigned long | write (ArrayBuffer buffer) |
attribute void | close (unsigned long error) |
Data Fields | |
attribute unsigned long | reply |
attribute readonly DOMString | method |
attribute readonly DOMString | url |
attribute readonly unsigned long | auth_code |
attribute readonly Array | headers_in |
attribute Array | headers_out |
interface for HTTP request
attribute void _HTTPRequest::send | ( | ) |
send the response to the request
attribute DOMString body attribute unsigned long _HTTPRequest::throttle | ( | unsigned long long | done, |
unsigned long long | total | ||
) |
reply body. It is undefined by default
callback function used to throttle the download, can be used even if the request is handled by gpac. It is undefined by default
done | amount of bytes already sent in request |
total | total amount of bytes in request |
attribute signed long _HTTPRequest::read | ( | ArrayBuffer | buffer | ) |
callback function used to get data (GET requests). It is undefined by default
buffer | array buffer to fill (shared array, do NOT keep) |
attribute unsigned long _HTTPRequest::write | ( | ArrayBuffer | buffer | ) |
callback function used to receive data (PUT/POST requests). It is undefined by default
buffer | array buffer received. If null, end of stream is reached |
attribute void _HTTPRequest::close | ( | unsigned long | error | ) |
callback function used to monitor end of session. It is undefined by default
error | GPAC error code for the session. If 1 (GF_EOS), the session is ended but underlying network is kept alive, otherwise session is destroyed |
attribute unsigned long _HTTPRequest::reply |
HTTP reply code to use. If 0, the request is handled by GPAC as usual. Otherwise, the request is handled by your script if the reply does not indicate an error
attribute readonly DOMString _HTTPRequest::method |
HTTP method of the request
attribute readonly DOMString _HTTPRequest::url |
HTTP URL of the request
attribute readonly unsigned long _HTTPRequest::auth_code |
Authentication reply code - requests are pre-identified using GPAC credentials: a value of 401 indicates no identification, 200 indicates identification OK, 403 indicates failure
attribute readonly Array _HTTPRequest::headers_in |
HTTP headers of the request, array of _HTTPHeader objects
attribute Array _HTTPRequest::headers_out |
HTTP headers to set on the response, array of _HTTPHeader objects (initialized as empty)