Three.V8

3D rendering engine using JavaScript as user script.

View on GitHub

<–Home

class HttpClient

Provides a few interfaces to make HTTP requests.

No constructor, exposed as a global object http.

Name Description
Methods  
get Makes a synchronized HTTP Get Request.
getAsync Makes an asynchronized HTTP Get Request.

Methods

get()

.get(url: String, is_string = False: Boolean): String/ArrayBuffer

Makes a synchronized HTTP Get Request.

Returns String when is_string == True.

Return ArrayBuffer when is_string == False.

getAsync()

.getAsync(url:String, is_string = False: Boolean, callback: Function) : undefined

Makes an asynchronized HTTP Get Request.

When is_string == True:

callback(result: Boolean, text: String): undefined

When is_string == False:

callback(result: Boolean, data: ArrayBuffer): undefined