RemoteServiceHttpRequest
ClassA http request which can be sent using the RemoteServiceModule.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: fully supported
- Camera Kit Mobile: fully supported
- SnapchatNot supported — Available on SPECS and Camera Kit only
- SPECSFully supported
- Camera Kit WebFully supported
- Camera Kit MobileFully supported
Since Lens Scripting v271
A http request which can be sent using the RemoteServiceModule.
Index
Extends
Properties
body
body:
string|Uint8Array<ArrayBufferLike> |number[]
SPECSCamera Kit
The body of the http request.
Since
Lens Scripting Version 271
Default Value
""
@snapOS
@cameraKit
contentType
contentType:
string
SPECSCamera Kit
The content type of the http request.
Since
Lens Scripting Version 271
Default Value
""
@snapOS
@cameraKit
headers
headers:
object
SPECSCamera Kit
The headers of the http request.
Index Signature
[key: string]: string
Since
Lens Scripting Version 271
Default Value
{}
@snapOS
@cameraKit
method
method:
HttpRequestMethod
SPECSCamera Kit
The method which should be used to send this http request.
Since
Lens Scripting Version 271
Default Value
RemoteServiceHttpRequest.HttpRequestMethod.Get
@snapOS
@cameraKit
url
url:
string
SPECSCamera Kit
The URL which this http request should point to.
Since
Lens Scripting Version 271
Default Value
""
@snapOS
@cameraKit
Methods
create()
staticcreate():RemoteServiceHttpRequest
SPECSCamera Kit
Create a new http request.
Returns
RemoteServiceHttpRequest
getHeader()
getHeader(
name):string
SPECSCamera Kit
Get the header of the http request.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
string
Since
Lens Scripting Version 271
getTypeName()
staticgetTypeName():TypeName<RemoteServiceHttpRequest>
SPECSCamera Kit
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<RemoteServiceHttpRequest>
Since
Lens Scripting Version 271
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
setHeader()
setHeader(
name,value):void
SPECSCamera Kit
Set the header of the http request.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | string |
Returns
void
Since
Lens Scripting Version 271
Nested types
Enumerations
| Enumeration | Description |
|---|---|
| HttpRequestMethod | The http method which should be used to send this http request. |