Skip to main content

RemoteServiceHttpResponse

Class

The response returned by a RemoteServiceHttpRequest call.

  • 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

Platform details

  • Snapchat — Not supported — Available on SPECS and Camera Kit only.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Since Lens Scripting v271

The response returned by a RemoteServiceHttpRequest call.

Index

Extends

Properties

body

readonly body: string

SPECSCamera Kit

The body of the response.

Since

Lens Scripting Version 271


contentType

readonly contentType: string

SPECSCamera Kit

the content type of the response.

Since

Lens Scripting Version 271


headers

readonly headers: object

SPECSCamera Kit

The headers of the response.

Index Signature

[key: string]: string

Since

Lens Scripting Version 271


statusCode

readonly statusCode: number

SPECSCamera Kit

The http response status code.

Since

Lens Scripting Version 271

Methods

asResource()

asResource(): DynamicResource

SPECSCamera Kit

Get the result as a DynamicResource to be used with RemoteMediaModule.

Returns

DynamicResource

Since

Lens Scripting Version 271


getHeader()

getHeader(name): string

SPECSCamera Kit

Get the header of the response.

Parameters

ParameterType
namestring

Returns

string

Since

Lens Scripting Version 271


getTypeName()

static getTypeName(): TypeName<RemoteServiceHttpResponse>

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<RemoteServiceHttpResponse>

Since

Lens Scripting Version 271

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object matches or derives from the passed in type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


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

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame