Constructor
new ReqQ4S(method, requestURI, q4sVersion, headers, body)
Constructor for the ReqQ4S class. Does not validate input data coherence.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
method |
string | The string containing the method. | ||||||
requestURI |
URL | The URI of the request. | ||||||
q4sVersion |
string | The Q4S version. | ||||||
headers |
Object | Object containing all the headers.
Properties
|
||||||
body |
string | The body of the request. Normally a sdp message. |
- Source:
Members
body :String
The body of the request.
Type:
- String
- Source:
headers :Object
Object containing the headers. Each property name os the name of the
header. Its value is the field.
Type:
- Object
- Source:
method :String
Method of the request.
Type:
- String
- Source:
q4sVersion :String
The version of the Q4S protocol.
Type:
- String
- Source:
requestURI :String
The URI field of the request
Type:
- String
- Source:
Methods
(static) fromString(message) → {Object}
Factory method to build a new ReqQ4S from an string. Validates the the
created request object is correct.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The mesage which has to be parsed into a ReqQ4S. |
- Source:
Returns:
On sucess an object of the class ReqQ4S, otherwise an
error will be trown
- Type
- Object
(static) genReq(method, requestURI, headers, body) → {ReqQ4SQ}
Factory method to build a new ReqQ4S abstracting part of the details.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
method |
string | The string containing the method. | ||||||
requestURI |
URL | The URI of the request. | ||||||
headers |
Object | Object containing all the headers.
Properties
|
||||||
body |
string | The body of the request. Normally a sdp message. returns an error. |
- Source:
Returns:
- Type
- ReqQ4SQ
signBody()
Introduces a new header signature in this containing the MD5 of the body
of this.
- Source:
toString() → {string}
Form the message format of this request. Use it to send it over TCP/UDP.
- Source:
Returns:
- String format of this response.
- Type
- string
validate()
Check that the data in this is correct and returns true if all is ok or
false if data is malformed.If there is anything malformed an error will be
trown.
- Source: