- getJson(url: string, ok?: ((json: object, httpStatus?: number) => void), failed?: ((errInfo: string, httpStatus?: number) => void), timeout?: number): void
-
Parameters
-
url: string
-
Optional
ok: ((json: object, httpStatus?: number) => void)
-
- (json: object, httpStatus?: number): void
-
Parameters
-
json: object
-
Optional
httpStatus: number
Returns void
-
Optional
failed: ((errInfo: string, httpStatus?: number) => void)
-
- (errInfo: string, httpStatus?: number): void
-
Parameters
-
errInfo: string
-
Optional
httpStatus: number
Returns void
-
timeout: number = 50000
Returns void
Loads text via HTTP(S), expects it to be json and converts it to an object. Uses XMLHttpRequest.