forked from nativescript-community/https
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreferences.d.ts
More file actions
70 lines (68 loc) · 3.04 KB
/
references.d.ts
File metadata and controls
70 lines (68 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
/// <reference path="./platforms/android/typings/okio.d.ts" />
/// <reference path="./platforms/android/typings/okhttp3.d.ts" />
/// <reference path="./platforms/ios/typings/objc!AFNetworking.d.ts" />
declare namespace com {
export namespace nativescript {
export namespace https {
class OkhttpCallback extends okhttp3.Callback {
public constructor();
onStringResponse(
responseString: string,
statusCode: number,
headers: okhttp3.Headers
);
}
class OkHttpResponse {
public constructor(body: okhttp3.ResponseBody);
cancel();
asString(): string;
asStringAsync(callback: OkHttpResponseAsyncCallback);
toBitmap(): globalAndroid.graphics.Bitmap;
toBitmapAsync(callback: OkHttpResponseAsyncCallback);
toFile(filePath: string): java.io.File;
toFileAsync(
filePath: string,
callback: OkHttpResponseAsyncCallback
);
toByteArray(): java.nio.ByteBuffer;
toByteArrayAsync(callback: OkHttpResponseAsyncCallback);
progressCallback?: OkHttpResponseProgressCallback;
closeCallback?: OkHttpResponseCloseCallback;
}
namespace OkHttpResponse {
class OkHttpResponseAsyncCallback {
public constructor(implementation: {
onException(exc: java.io.Exception);
onFile(file: java.io.File);
onBitmap(bitmap: globalAndroid.graphics.Bitmap);
onByteArray(buffer: java.nio.ByteBuffer);
onString(result: string);
});
public constructor();
onException(exc: java.io.Exception);
onFile(file: java.io.File);
onBitmap(bitmap: globalAndroid.graphics.Bitmap);
onByteArray(buffer: java.nio.ByteBuffer);
onString(result: string);
}
class OkHttpResponseProgressCallback {
public constructor(implementation: {
onProgress(current: number, total: number);
});
public constructor();
onProgress(current: number, total: number);
}
class OkHttpResponseCloseCallback {
public constructor(implementation: { onClose() });
public constructor();
onClose();
}
}
class QuotePreservingCookieJar extends okhttp3.CookieJar {
constructor(cookieHandler: java.net.CookieHandler);
}
}
}
}