diff --git a/.gitignore b/.gitignore
index f2ad902..5c1632f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ src/*.d.ts
seed-tests/seed-copy/**/*.*
seed-tests/seed-copy-new-git-repo/**/*.*
!demo/karma.conf.js
+!demo/webpack.config.js
!demo/app/tests/*.js
demo/*.d.ts
!demo/references.d.ts
diff --git a/README.md b/README.md
index f131b68..862ffac 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,10 @@ You can bypass this behavior by adding the following to your projects `Info.plis
```
> This plugin **does not** add `NSAllowsArbitraryLoads` to your projects `Info.plist` for you.
+## `Android` troubleshooting
+If you app crashes with a message that it's doing too much networkin on the main thread,
+then pass the option `allowLargeResponse` with value `true` to the `request` function.
+
# Thanks
Who | Why
------------ | -------------
diff --git a/demo/app/App_Resources/iOS/build.xcconfig b/demo/app/App_Resources/iOS/build.xcconfig
index 0562055..6961c55 100644
--- a/demo/app/App_Resources/iOS/build.xcconfig
+++ b/demo/app/App_Resources/iOS/build.xcconfig
@@ -1,5 +1,5 @@
// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
-// CODE_SIGN_IDENTITY = iPhone Distribution
+// CODE_SIGN_IDENTITY = iPhone Distribution
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
diff --git a/demo/app/assets/httpbin.org.cer b/demo/app/assets/httpbin.org.cer
index e003b59..ec44c38 100644
Binary files a/demo/app/assets/httpbin.org.cer and b/demo/app/assets/httpbin.org.cer differ
diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts
index b1c20fd..1fa633e 100644
--- a/demo/app/main-page.ts
+++ b/demo/app/main-page.ts
@@ -1,20 +1,32 @@
-
import * as Observable from 'tns-core-modules/data/observable'
import * as Page from 'tns-core-modules/ui/page'
import * as fs from 'tns-core-modules/file-system'
import * as dialogs from 'tns-core-modules/ui/dialogs'
import * as Https from 'nativescript-https'
-
-
export function onNavigatingTo(args: Page.NavigatedData) {
let page = args.object as Page.Page
page.bindingContext = Observable.fromObject({ enabled: false })
}
-function getRequest(url: string) {
+function getRequest(url: string, allowLargeResponse = false) {
+ Https.request({
+ url,
+ method: 'GET',
+ allowLargeResponse
+ }).then(function(response) {
+ console.log('Https.request response', response)
+ }).catch(function(error) {
+ console.error('Https.request error', error)
+ dialogs.alert(error)
+ })
+}
+
+function postRequest(url: string, body: any) {
Https.request({
- url, method: 'GET',
+ url,
+ method: 'POST',
+ body
}).then(function(response) {
console.log('Https.request response', response)
}).catch(function(error) {
@@ -23,7 +35,9 @@ function getRequest(url: string) {
})
}
+export function postHttpbin() { postRequest('https://httpbin.org/post', {"foo": "bar", "baz": undefined, "plaz": null}) }
export function getHttpbin() { getRequest('https://httpbin.org/get') }
+export function getHttpbinLargeResponse() { getRequest('https://httpbin.org/bytes/100000', true) }
export function getMockbin() { getRequest('https://mockbin.com/request') }
export function enableSSLPinning(args: Observable.EventData) {
diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml
index 879c258..df02365 100644
--- a/demo/app/main-page.xml
+++ b/demo/app/main-page.xml
@@ -5,10 +5,14 @@
-
-
+
+
+
+
+
+
diff --git a/demo/nsconfig.json b/demo/nsconfig.json
new file mode 100644
index 0000000..a6d7547
--- /dev/null
+++ b/demo/nsconfig.json
@@ -0,0 +1,3 @@
+{
+ "useLegacyWorkflow": false
+}
\ No newline at end of file
diff --git a/demo/package.json b/demo/package.json
index 5a9be5a..4e0811c 100644
--- a/demo/package.json
+++ b/demo/package.json
@@ -2,14 +2,17 @@
"nativescript": {
"id": "org.nativescript.demo",
"tns-android": {
- "version": "5.1.0"
+ "version": "5.4.0"
+ },
+ "tns-ios": {
+ "version": "5.4.0"
}
},
"dependencies": {
"nativescript-https": "file:../src",
"nativescript-theme-core": "^1.0.4",
"nativescript-unit-test-runner": "^0.3.4",
- "tns-core-modules": "^5.1.0"
+ "tns-core-modules": "~5.4.0"
},
"devDependencies": {
"jasmine-core": "^2.5.2",
@@ -18,10 +21,10 @@
"karma-nativescript-launcher": "^0.4.0",
"nativescript-css-loader": "~0.26.1",
"nativescript-dev-typescript": "~0.7.4",
- "nativescript-dev-webpack": "~0.17.0",
- "tns-platform-declarations": "^5.1.0",
+ "nativescript-dev-webpack": "0.24.1",
+ "tns-platform-declarations": "~5.4.0",
"tslint": "~5.11.0",
- "typescript": "~2.8.2"
+ "typescript": "~2.9.0"
},
"scripts": {
"build.plugin": "cd ../src && npm run build",
diff --git a/demo/tsconfig.json b/demo/tsconfig.json
index e5a86c7..019ba64 100644
--- a/demo/tsconfig.json
+++ b/demo/tsconfig.json
@@ -31,11 +31,9 @@
}
},
"include": [
- "../src",
"**/*"
],
"exclude": [
- "../src/node_modules",
"node_modules",
"platforms"
],
diff --git a/demo/webpack.config.js b/demo/webpack.config.js
new file mode 100644
index 0000000..1d05c37
--- /dev/null
+++ b/demo/webpack.config.js
@@ -0,0 +1,313 @@
+const { join, relative, resolve, sep } = require("path");
+
+const webpack = require("webpack");
+const nsWebpack = require("nativescript-dev-webpack");
+const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
+const CleanWebpackPlugin = require("clean-webpack-plugin");
+const CopyWebpackPlugin = require("copy-webpack-plugin");
+const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
+const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
+const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
+const TerserPlugin = require("terser-webpack-plugin");
+const hashSalt = Date.now().toString();
+
+module.exports = env => {
+ // Add your custom Activities, Services and other Android app components here.
+ const appComponents = [
+ "tns-core-modules/ui/frame",
+ "tns-core-modules/ui/frame/activity",
+ ];
+
+ const platform = env && (env.android && "android" || env.ios && "ios");
+ if (!platform) {
+ throw new Error("You need to provide a target platform!");
+ }
+
+ const platforms = ["ios", "android"];
+ const projectRoot = __dirname;
+
+ // Default destination inside platforms//...
+ const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
+ const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
+
+ const {
+ // The 'appPath' and 'appResourcesPath' values are fetched from
+ // the nsconfig.json configuration file
+ // when bundling with `tns run android|ios --bundle`.
+ appPath = "app",
+ appResourcesPath = "app/App_Resources",
+
+ // You can provide the following flags when running 'tns run android|ios'
+ snapshot, // --env.snapshot
+ uglify, // --env.uglify
+ report, // --env.report
+ sourceMap, // --env.sourceMap
+ hiddenSourceMap, // --env.hiddenSourceMap
+ hmr, // --env.hmr,
+ unitTesting, // --env.unitTesting
+ } = env;
+ const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
+ const externals = nsWebpack.getConvertedExternals(env.externals);
+
+ const appFullPath = resolve(projectRoot, appPath);
+ const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
+
+ const entryModule = nsWebpack.getEntryModule(appFullPath, platform);
+ const entryPath = `.${sep}${entryModule}.ts`;
+ const entries = { bundle: entryPath };
+
+ const tsConfigPath = resolve(projectRoot, "tsconfig.tns.json");
+
+ if (platform === "ios") {
+ entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
+ };
+
+ let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
+
+ const config = {
+ mode: uglify ? "production" : "development",
+ context: appFullPath,
+ externals,
+ watchOptions: {
+ ignored: [
+ appResourcesFullPath,
+ // Don't watch hidden files
+ "**/.*",
+ ]
+ },
+ target: nativescriptTarget,
+ entry: entries,
+ output: {
+ pathinfo: false,
+ path: dist,
+ sourceMapFilename,
+ libraryTarget: "commonjs2",
+ filename: "[name].js",
+ globalObject: "global",
+ hashSalt
+ },
+ resolve: {
+ extensions: [".ts", ".js", ".scss", ".css"],
+ // Resolve {N} system modules from tns-core-modules
+ modules: [
+ resolve(__dirname, "node_modules/tns-core-modules"),
+ resolve(__dirname, "node_modules"),
+ "node_modules/tns-core-modules",
+ "node_modules",
+ ],
+ alias: {
+ '~': appFullPath
+ },
+ // resolve symlinks to symlinked modules
+ symlinks: true
+ },
+ resolveLoader: {
+ // don't resolve symlinks to symlinked loaders
+ symlinks: false
+ },
+ node: {
+ // Disable node shims that conflict with NativeScript
+ "http": false,
+ "timers": false,
+ "setImmediate": false,
+ "fs": "empty",
+ "__dirname": false,
+ },
+ devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
+ optimization: {
+ runtimeChunk: "single",
+ splitChunks: {
+ cacheGroups: {
+ vendor: {
+ name: "vendor",
+ chunks: "all",
+ test: (module, chunks) => {
+ const moduleName = module.nameForCondition ? module.nameForCondition() : '';
+ return /[\\/]node_modules[\\/]/.test(moduleName) ||
+ appComponents.some(comp => comp === moduleName);
+
+ },
+ enforce: true,
+ },
+ }
+ },
+ minimize: !!uglify,
+ minimizer: [
+ new TerserPlugin({
+ parallel: true,
+ cache: true,
+ sourceMap: isAnySourceMapEnabled,
+ terserOptions: {
+ output: {
+ comments: false,
+ semicolons: !isAnySourceMapEnabled
+ },
+ compress: {
+ // The Android SBG has problems parsing the output
+ // when these options are enabled
+ 'collapse_vars': platform !== "android",
+ sequences: platform !== "android",
+ }
+ }
+ })
+ ],
+ },
+ module: {
+ rules: [
+ {
+ test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
+ use: [
+ // Require all Android app components
+ platform === "android" && {
+ loader: "nativescript-dev-webpack/android-app-components-loader",
+ options: { modules: appComponents }
+ },
+
+ {
+ loader: "nativescript-dev-webpack/bundle-config-loader",
+ options: {
+ loadCss: !snapshot, // load the application css if in debug mode
+ unitTesting,
+ appFullPath,
+ projectRoot,
+ }
+ },
+ ].filter(loader => !!loader)
+ },
+
+ {
+ test: /-page\.ts$/,
+ use: "nativescript-dev-webpack/script-hot-loader"
+ },
+
+ {
+ test: /\.(css|scss)$/,
+ use: "nativescript-dev-webpack/style-hot-loader"
+ },
+
+ {
+ test: /\.(html|xml)$/,
+ use: "nativescript-dev-webpack/markup-hot-loader"
+ },
+
+ { test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" },
+
+ {
+ test: /\.css$/,
+ use: { loader: "css-loader", options: { url: false } }
+ },
+
+ {
+ test: /\.scss$/,
+ use: [
+ { loader: "css-loader", options: { url: false } },
+ "sass-loader"
+ ]
+ },
+
+ {
+ test: /\.ts$/,
+ use: {
+ loader: "ts-loader",
+ options: {
+ configFile: tsConfigPath,
+ // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
+ // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
+ transpileOnly: true,
+ allowTsInNodeModules: true,
+ compilerOptions: {
+ sourceMap: isAnySourceMapEnabled,
+ declaration: false
+ }
+ },
+ }
+ },
+ ]
+ },
+ plugins: [
+ // Define useful constants like TNS_WEBPACK
+ new webpack.DefinePlugin({
+ "global.TNS_WEBPACK": "true",
+ "process": undefined,
+ }),
+ // Remove all files from the out dir.
+ new CleanWebpackPlugin([`${dist}/**/*`]),
+ // Copy assets to out dir. Add your own globs as needed.
+ new CopyWebpackPlugin([
+ { from: { glob: "fonts/**" } },
+ { from: { glob: "**/*.jpg" } },
+ { from: { glob: "**/*.png" } },
+ { from: { glob: "assets/*.cer" } },
+ ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
+ // Generate a bundle starter script and activate it in package.json
+ new nsWebpack.GenerateBundleStarterPlugin(
+ // Don't include `runtime.js` when creating a snapshot. The plugin
+ // configures the WebPack runtime to be generated inside the snapshot
+ // module and no `runtime.js` module exist.
+ (snapshot ? [] : ["./runtime"])
+ .concat([
+ "./vendor",
+ "./bundle",
+ ])
+ ),
+ // For instructions on how to set up workers with webpack
+ // check out https://github.com/nativescript/worker-loader
+ new NativeScriptWorkerPlugin(),
+ new nsWebpack.PlatformFSPlugin({
+ platform,
+ platforms,
+ }),
+ // Does IPC communication with the {N} CLI to notify events when running in watch mode.
+ new nsWebpack.WatchStateLoggerPlugin(),
+ // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
+ // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
+ new ForkTsCheckerWebpackPlugin({
+ tsconfig: tsConfigPath,
+ async: false,
+ useTypescriptIncrementalApi: true,
+ memoryLimit: 4096
+ })
+ ],
+ };
+
+ // Copy the native app resources to the out dir
+ // only if doing a full build (tns run/build) and not previewing (tns preview)
+ if (!externals || externals.length === 0) {
+ config.plugins.push(new CopyWebpackPlugin([
+ {
+ from: `${appResourcesFullPath}/${appResourcesPlatformDir}`,
+ to: `${dist}/App_Resources/${appResourcesPlatformDir}`,
+ context: projectRoot
+ },
+ ]));
+ }
+
+ if (report) {
+ // Generate report files for bundles content
+ config.plugins.push(new BundleAnalyzerPlugin({
+ analyzerMode: "static",
+ openAnalyzer: false,
+ generateStatsFile: true,
+ reportFilename: resolve(projectRoot, "report", `report.html`),
+ statsFilename: resolve(projectRoot, "report", `stats.json`),
+ }));
+ }
+
+ if (snapshot) {
+ config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
+ chunk: "vendor",
+ requireModules: [
+ "tns-core-modules/bundle-entry-points",
+ ],
+ projectRoot,
+ webpackConfig: config,
+ }));
+ }
+
+ if (hmr) {
+ config.plugins.push(new webpack.HotModuleReplacementPlugin());
+ }
+
+
+ return config;
+};
diff --git a/src/.npmignore b/src/.npmignore
index b23a9bf..b48a881 100644
--- a/src/.npmignore
+++ b/src/.npmignore
@@ -3,6 +3,7 @@
!*.d.ts
tsconfig.json
scripts/*
+platforms/ios/typings
platforms/android/*
!platforms/android/include.gradle
!platforms/android/*.aar
diff --git a/src/https.android.ts b/src/https.android.ts
index a130232..56af6eb 100644
--- a/src/https.android.ts
+++ b/src/https.android.ts
@@ -1,26 +1,5 @@
-
import * as Https from './https.common'
-import * as application from 'tns-core-modules/application'
-import { HttpRequestOptions, Headers, HttpResponse } from 'tns-core-modules/http'
-import { isDefined, isNullOrUndefined } from 'tns-core-modules/utils/types'
-
-
-
-// declare var java: any
-// declare var javax: any
-// java.security.cert.Certificate as any
-// declare module java {
-// export module security {
-// export module cert {
-// export interface Certificate { }
-// }
-// }
-// export module io {
-// export interface FileInputStream { }
-// }
-// }
-
-
+import { isDefined } from 'tns-core-modules/utils/types'
interface Ipeer {
enabled: boolean
@@ -30,6 +9,7 @@ interface Ipeer {
certificate?: string
x509Certificate?: java.security.cert.Certificate
}
+
let peer: Ipeer = {
enabled: false,
allowInvalidCertificates: false,
@@ -70,6 +50,7 @@ export function enableSSLPinning(options: Https.HttpsSSLPinningOptions) {
getClient(true)
console.log('nativescript-https > Enabled SSL pinning')
}
+
export function disableSSLPinning() {
peer.enabled = false
getClient(true)
@@ -77,8 +58,6 @@ export function disableSSLPinning() {
}
console.info('nativescript-https > Disabled SSL pinning by default')
-
-
let Client: okhttp3.OkHttpClient
function getClient(reload: boolean = false): okhttp3.OkHttpClient {
// if (!Client) {
@@ -203,6 +182,14 @@ export function request(opts: Https.HttpsRequestOptions): Promise Disabled SSL pinning by default')
-
-
function AFSuccess(resolve, task: NSURLSessionDataTask, data: NSDictionary & NSData & NSArray) {
// console.log('AFSuccess')
let content: any
@@ -140,7 +133,7 @@ export function request(opts: Https.HttpsRequestOptions): Promise (https://github.com/roblav96)",
+ "contributors": [{
+ "name": "Eddy Verbruggen",
+ "email": "eddyverbruggen@gmail.com",
+ "url": "https://github.com/EddyVerbruggen"
+ }],
"repository": "github:gethuman/nativescript-https",
"homepage": "https://github.com/gethuman/nativescript-https",
"bugs": "https://github.com/gethuman/nativescript-https/issues",
"license": "MIT",
"readmeFilename": "README.md",
- "keywords": ["secure", "https", "http", "ssl", "tls", "pinning", "nativescript", "ecosystem:nativescript", "nativescript-android", "nativescript-ios", "JavaScript", "Android", "iOS"]
+ "keywords": [
+ "secure",
+ "https",
+ "http",
+ "ssl",
+ "tls",
+ "pinning",
+ "nativescript",
+ "ecosystem:nativescript",
+ "nativescript-android",
+ "nativescript-ios",
+ "JavaScript",
+ "Android",
+ "iOS"
+ ]
}
diff --git a/src/platforms/android/include.gradle b/src/platforms/android/include.gradle
index 8f6decd..20093c9 100644
--- a/src/platforms/android/include.gradle
+++ b/src/platforms/android/include.gradle
@@ -1,10 +1,3 @@
-//
-
dependencies {
- compile 'com.squareup.okhttp3:okhttp:3.12.1'
+ implementation 'com.squareup.okhttp3:okhttp:3.12.1'
}
-
-android {
-
-}
-
diff --git a/src/platforms/android/typings/android-declarations.d.ts b/src/platforms/android/typings/android-declarations.d.ts
new file mode 100644
index 0000000..add486e
--- /dev/null
+++ b/src/platforms/android/typings/android-declarations.d.ts
@@ -0,0 +1 @@
+declare module native { export class Array { constructor(); length: number; [index: number]: T; } }
diff --git a/src/platforms/android/typings/okhttp3.d.ts b/src/platforms/android/typings/okhttp3.d.ts
new file mode 100644
index 0000000..8bb3c53
--- /dev/null
+++ b/src/platforms/android/typings/okhttp3.d.ts
@@ -0,0 +1,2620 @@
+///
+
+declare module okhttp3 {
+ export class Address {
+ public static class: java.lang.Class;
+ public proxy(): java.net.Proxy;
+ public equals(param0: any): boolean;
+ public constructor(param0: string, param1: number, param2: okhttp3.Dns, param3: javax.net.SocketFactory, param4: javax.net.ssl.SSLSocketFactory, param5: javax.net.ssl.HostnameVerifier, param6: okhttp3.CertificatePinner, param7: okhttp3.Authenticator, param8: java.net.Proxy, param9: java.util.List, param10: java.util.List, param11: java.net.ProxySelector);
+ public proxySelector(): java.net.ProxySelector;
+ public sslSocketFactory(): javax.net.ssl.SSLSocketFactory;
+ public url(): okhttp3.HttpUrl;
+ public certificatePinner(): okhttp3.CertificatePinner;
+ public toString(): string;
+ public protocols(): java.util.List;
+ public socketFactory(): javax.net.SocketFactory;
+ public dns(): okhttp3.Dns;
+ public proxyAuthenticator(): okhttp3.Authenticator;
+ public hostnameVerifier(): javax.net.ssl.HostnameVerifier;
+ public hashCode(): number;
+ public connectionSpecs(): java.util.List;
+ }
+}
+
+declare module okhttp3 {
+ export class Authenticator {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Authenticator interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ authenticate(param0: okhttp3.Route, param1: okhttp3.Response): okhttp3.Request;
+ (): void;
+ });
+ public constructor();
+ public static NONE: okhttp3.Authenticator;
+ public authenticate(param0: okhttp3.Route, param1: okhttp3.Response): okhttp3.Request;
+ }
+}
+
+declare module okhttp3 {
+ export class Cache {
+ public static class: java.lang.Class;
+ public close(): void;
+ public directory(): java.io.File;
+ public constructor(param0: java.io.File, param1: number);
+ public static key(param0: okhttp3.HttpUrl): string;
+ public writeAbortCount(): number;
+ public evictAll(): void;
+ public delete(): void;
+ public isClosed(): boolean;
+ public networkCount(): number;
+ public requestCount(): number;
+ public flush(): void;
+ public initialize(): void;
+ public size(): number;
+ public writeSuccessCount(): number;
+ public hitCount(): number;
+ public urls(): java.util.Iterator;
+ public maxSize(): number;
+ }
+ export module Cache {
+ export class CacheRequestImpl extends okhttp3.internal.cache.CacheRequest {
+ public static class: java.lang.Class;
+ public body(): okio.Sink;
+ public abort(): void;
+ }
+ export class CacheResponseBody extends okhttp3.ResponseBody {
+ public static class: java.lang.Class;
+ public contentLength(): number;
+ public source(): okio.BufferedSource;
+ public contentType(): okhttp3.MediaType;
+ }
+ export class Entry {
+ public static class: java.lang.Class;
+ public matches(param0: okhttp3.Request, param1: okhttp3.Response): boolean;
+ public response(param0: okhttp3.internal.cache.DiskLruCache.Snapshot): okhttp3.Response;
+ public writeTo(param0: okhttp3.internal.cache.DiskLruCache.Editor): void;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class CacheControl {
+ public static class: java.lang.Class;
+ public static FORCE_NETWORK: okhttp3.CacheControl;
+ public static FORCE_CACHE: okhttp3.CacheControl;
+ public maxStaleSeconds(): number;
+ public mustRevalidate(): boolean;
+ public static parse(param0: okhttp3.Headers): okhttp3.CacheControl;
+ public toString(): string;
+ public minFreshSeconds(): number;
+ public onlyIfCached(): boolean;
+ public noCache(): boolean;
+ public noTransform(): boolean;
+ public isPrivate(): boolean;
+ public immutable(): boolean;
+ public sMaxAgeSeconds(): number;
+ public noStore(): boolean;
+ public maxAgeSeconds(): number;
+ public isPublic(): boolean;
+ }
+ export module CacheControl {
+ export class Builder {
+ public static class: java.lang.Class;
+ public noCache(): okhttp3.CacheControl.Builder;
+ public maxStale(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
+ public immutable(): okhttp3.CacheControl.Builder;
+ public onlyIfCached(): okhttp3.CacheControl.Builder;
+ public minFresh(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
+ public maxAge(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
+ public constructor();
+ public build(): okhttp3.CacheControl;
+ public noStore(): okhttp3.CacheControl.Builder;
+ public noTransform(): okhttp3.CacheControl.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Call {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Call interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ request(): okhttp3.Request;
+ execute(): okhttp3.Response;
+ enqueue(param0: okhttp3.Callback): void;
+ cancel(): void;
+ isExecuted(): boolean;
+ isCanceled(): boolean;
+ timeout(): okio.Timeout;
+ clone(): okhttp3.Call;
+ });
+ public constructor();
+ public isExecuted(): boolean;
+ public clone(): okhttp3.Call;
+ public request(): okhttp3.Request;
+ public execute(): okhttp3.Response;
+ public isCanceled(): boolean;
+ public enqueue(param0: okhttp3.Callback): void;
+ public cancel(): void;
+ public timeout(): okio.Timeout;
+ }
+ export module Call {
+ export class Factory {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Call$Factory interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ newCall(param0: okhttp3.Request): okhttp3.Call;
+ });
+ public constructor();
+ public newCall(param0: okhttp3.Request): okhttp3.Call;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Callback {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Callback interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ onFailure(param0: okhttp3.Call, param1: java.io.IOException): void;
+ onResponse(param0: okhttp3.Call, param1: okhttp3.Response): void;
+ });
+ public constructor();
+ public onResponse(param0: okhttp3.Call, param1: okhttp3.Response): void;
+ public onFailure(param0: okhttp3.Call, param1: java.io.IOException): void;
+ }
+}
+
+declare module okhttp3 {
+ export class CertificatePinner {
+ public static class: java.lang.Class;
+ public static DEFAULT: okhttp3.CertificatePinner;
+ public equals(param0: any): boolean;
+ public static pin(param0: java.security.cert.Certificate): string;
+ public check(param0: string, param1: native.Array): void;
+ public hashCode(): number;
+ public check(param0: string, param1: java.util.List): void;
+ }
+ export module CertificatePinner {
+ export class Builder {
+ public static class: java.lang.Class;
+ public build(): okhttp3.CertificatePinner;
+ public add(param0: string, param1: native.Array): okhttp3.CertificatePinner.Builder;
+ public constructor();
+ }
+ export class Pin {
+ public static class: java.lang.Class;
+ public equals(param0: any): boolean;
+ public toString(): string;
+ public hashCode(): number;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Challenge {
+ public static class: java.lang.Class;
+ public authParams(): java.util.Map;
+ public charset(): java.nio.charset.Charset;
+ public equals(param0: any): boolean;
+ public scheme(): string;
+ public hashCode(): number;
+ public toString(): string;
+ public constructor(param0: string, param1: java.util.Map);
+ public withCharset(param0: java.nio.charset.Charset): okhttp3.Challenge;
+ public constructor(param0: string, param1: string);
+ public realm(): string;
+ }
+}
+
+declare module okhttp3 {
+ export class CipherSuite {
+ public static class: java.lang.Class;
+ public static TLS_RSA_WITH_NULL_MD5: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_RC4_128_MD5: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DH_anon_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_RC4_128_MD5: okhttp3.CipherSuite;
+ public static TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_DES_CBC_MD5: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_3DES_EDE_CBC_MD5: okhttp3.CipherSuite;
+ public static TLS_KRB5_WITH_RC4_128_MD5: okhttp3.CipherSuite;
+ public static TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_EXPORT_WITH_RC4_40_SHA: okhttp3.CipherSuite;
+ public static TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5: okhttp3.CipherSuite;
+ public static TLS_KRB5_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_NULL_SHA256: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_PSK_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_PSK_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_PSK_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_PSK_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_SEED_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_DSS_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_DH_anon_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_EMPTY_RENEGOTIATION_INFO_SCSV: okhttp3.CipherSuite;
+ public static TLS_FALLBACK_SCSV: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_anon_WITH_NULL_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_anon_WITH_RC4_128_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_anon_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDH_anon_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
+ public static TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
+ public static TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
+ public static TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
+ public static TLS_AES_128_GCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_AES_256_GCM_SHA384: okhttp3.CipherSuite;
+ public static TLS_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
+ public static TLS_AES_128_CCM_SHA256: okhttp3.CipherSuite;
+ public static TLS_AES_256_CCM_8_SHA256: okhttp3.CipherSuite;
+ public javaName(): string;
+ public static forJavaName(param0: string): okhttp3.CipherSuite;
+ public toString(): string;
+ }
+}
+
+declare module okhttp3 {
+ export class Connection {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Connection interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ route(): okhttp3.Route;
+ socket(): java.net.Socket;
+ handshake(): okhttp3.Handshake;
+ protocol(): okhttp3.Protocol;
+ });
+ public constructor();
+ public route(): okhttp3.Route;
+ public protocol(): okhttp3.Protocol;
+ public handshake(): okhttp3.Handshake;
+ public socket(): java.net.Socket;
+ }
+}
+
+declare module okhttp3 {
+ export class ConnectionPool {
+ public static class: java.lang.Class;
+ public constructor();
+ public connectionCount(): number;
+ public evictAll(): void;
+ public idleConnectionCount(): number;
+ public constructor(param0: number, param1: number, param2: java.util.concurrent.TimeUnit);
+ }
+}
+
+declare module okhttp3 {
+ export class ConnectionSpec {
+ public static class: java.lang.Class;
+ public static RESTRICTED_TLS: okhttp3.ConnectionSpec;
+ public static MODERN_TLS: okhttp3.ConnectionSpec;
+ public static COMPATIBLE_TLS: okhttp3.ConnectionSpec;
+ public static CLEARTEXT: okhttp3.ConnectionSpec;
+ public cipherSuites(): java.util.List;
+ public equals(param0: any): boolean;
+ public tlsVersions(): java.util.List;
+ public supportsTlsExtensions(): boolean;
+ public hashCode(): number;
+ public isCompatible(param0: javax.net.ssl.SSLSocket): boolean;
+ public isTls(): boolean;
+ public toString(): string;
+ }
+ export module ConnectionSpec {
+ export class Builder {
+ public static class: java.lang.Class;
+ public tlsVersions(param0: native.Array): okhttp3.ConnectionSpec.Builder;
+ public cipherSuites(param0: native.Array): okhttp3.ConnectionSpec.Builder;
+ public build(): okhttp3.ConnectionSpec;
+ public constructor(param0: okhttp3.ConnectionSpec);
+ public cipherSuites(param0: native.Array): okhttp3.ConnectionSpec.Builder;
+ public supportsTlsExtensions(param0: boolean): okhttp3.ConnectionSpec.Builder;
+ public allEnabledCipherSuites(): okhttp3.ConnectionSpec.Builder;
+ public tlsVersions(param0: native.Array): okhttp3.ConnectionSpec.Builder;
+ public allEnabledTlsVersions(): okhttp3.ConnectionSpec.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Cookie {
+ public static class: java.lang.Class;
+ public domain(): string;
+ public equals(param0: any): boolean;
+ public matches(param0: okhttp3.HttpUrl): boolean;
+ public static parseAll(param0: okhttp3.HttpUrl, param1: okhttp3.Headers): java.util.List;
+ public toString(): string;
+ public persistent(): boolean;
+ public httpOnly(): boolean;
+ public static parse(param0: okhttp3.HttpUrl, param1: string): okhttp3.Cookie;
+ public hostOnly(): boolean;
+ public expiresAt(): number;
+ public hashCode(): number;
+ public name(): string;
+ public path(): string;
+ public secure(): boolean;
+ public value(): string;
+ }
+ export module Cookie {
+ export class Builder {
+ public static class: java.lang.Class;
+ public domain(param0: string): okhttp3.Cookie.Builder;
+ public hostOnlyDomain(param0: string): okhttp3.Cookie.Builder;
+ public value(param0: string): okhttp3.Cookie.Builder;
+ public httpOnly(): okhttp3.Cookie.Builder;
+ public secure(): okhttp3.Cookie.Builder;
+ public expiresAt(param0: number): okhttp3.Cookie.Builder;
+ public build(): okhttp3.Cookie;
+ public name(param0: string): okhttp3.Cookie.Builder;
+ public constructor();
+ public path(param0: string): okhttp3.Cookie.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class CookieJar {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.CookieJar interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ saveFromResponse(param0: okhttp3.HttpUrl, param1: java.util.List): void;
+ loadForRequest(param0: okhttp3.HttpUrl): java.util.List;
+ (): void;
+ });
+ public constructor();
+ public static NO_COOKIES: okhttp3.CookieJar;
+ public loadForRequest(param0: okhttp3.HttpUrl): java.util.List;
+ public saveFromResponse(param0: okhttp3.HttpUrl, param1: java.util.List): void;
+ }
+}
+
+declare module okhttp3 {
+ export class Credentials {
+ public static class: java.lang.Class;
+ public static basic(param0: string, param1: string, param2: java.nio.charset.Charset): string;
+ public static basic(param0: string, param1: string): string;
+ }
+}
+
+declare module okhttp3 {
+ export class Dispatcher {
+ public static class: java.lang.Class;
+ public constructor();
+ public setMaxRequestsPerHost(param0: number): void;
+ public constructor(param0: java.util.concurrent.ExecutorService);
+ public queuedCallsCount(): number;
+ public runningCallsCount(): number;
+ public runningCalls(): java.util.List;
+ public cancelAll(): void;
+ public queuedCalls(): java.util.List;
+ public setMaxRequests(param0: number): void;
+ public getMaxRequestsPerHost(): number;
+ public executorService(): java.util.concurrent.ExecutorService;
+ public setIdleCallback(param0: java.lang.Runnable): void;
+ public getMaxRequests(): number;
+ }
+}
+
+declare module okhttp3 {
+ export class Dns {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Dns interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ lookup(param0: string): java.util.List;
+ (): void;
+ });
+ public constructor();
+ public static SYSTEM: okhttp3.Dns;
+ public lookup(param0: string): java.util.List;
+ }
+}
+
+declare module okhttp3 {
+ export abstract class EventListener {
+ public static class: java.lang.Class;
+ public static NONE: okhttp3.EventListener;
+ public constructor();
+ public connectFailed(param0: okhttp3.Call, param1: java.net.InetSocketAddress, param2: java.net.Proxy, param3: okhttp3.Protocol, param4: java.io.IOException): void;
+ public callStart(param0: okhttp3.Call): void;
+ public connectionReleased(param0: okhttp3.Call, param1: okhttp3.Connection): void;
+ public dnsEnd(param0: okhttp3.Call, param1: string, param2: java.util.List): void;
+ public responseBodyEnd(param0: okhttp3.Call, param1: number): void;
+ public callEnd(param0: okhttp3.Call): void;
+ public secureConnectStart(param0: okhttp3.Call): void;
+ public responseHeadersEnd(param0: okhttp3.Call, param1: okhttp3.Response): void;
+ public secureConnectEnd(param0: okhttp3.Call, param1: okhttp3.Handshake): void;
+ public dnsStart(param0: okhttp3.Call, param1: string): void;
+ public connectionAcquired(param0: okhttp3.Call, param1: okhttp3.Connection): void;
+ public connectEnd(param0: okhttp3.Call, param1: java.net.InetSocketAddress, param2: java.net.Proxy, param3: okhttp3.Protocol): void;
+ public requestHeadersEnd(param0: okhttp3.Call, param1: okhttp3.Request): void;
+ public responseBodyStart(param0: okhttp3.Call): void;
+ public connectStart(param0: okhttp3.Call, param1: java.net.InetSocketAddress, param2: java.net.Proxy): void;
+ public requestBodyEnd(param0: okhttp3.Call, param1: number): void;
+ public callFailed(param0: okhttp3.Call, param1: java.io.IOException): void;
+ public requestHeadersStart(param0: okhttp3.Call): void;
+ public requestBodyStart(param0: okhttp3.Call): void;
+ public responseHeadersStart(param0: okhttp3.Call): void;
+ }
+ export module EventListener {
+ export class Factory {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.EventListener$Factory interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ create(param0: okhttp3.Call): okhttp3.EventListener;
+ });
+ public constructor();
+ public create(param0: okhttp3.Call): okhttp3.EventListener;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class FormBody extends okhttp3.RequestBody {
+ public static class: java.lang.Class;
+ public value(param0: number): string;
+ public encodedValue(param0: number): string;
+ public name(param0: number): string;
+ public size(): number;
+ public encodedName(param0: number): string;
+ public contentType(): okhttp3.MediaType;
+ public writeTo(param0: okio.BufferedSink): void;
+ public contentLength(): number;
+ }
+ export module FormBody {
+ export class Builder {
+ public static class: java.lang.Class;
+ public constructor(param0: java.nio.charset.Charset);
+ public addEncoded(param0: string, param1: string): okhttp3.FormBody.Builder;
+ public constructor();
+ public add(param0: string, param1: string): okhttp3.FormBody.Builder;
+ public build(): okhttp3.FormBody;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Handshake {
+ public static class: java.lang.Class;
+ public equals(param0: any): boolean;
+ public static get(param0: javax.net.ssl.SSLSession): okhttp3.Handshake;
+ public static get(param0: okhttp3.TlsVersion, param1: okhttp3.CipherSuite, param2: java.util.List, param3: java.util.List): okhttp3.Handshake;
+ public hashCode(): number;
+ public localCertificates(): java.util.List;
+ public localPrincipal(): java.security.Principal;
+ public tlsVersion(): okhttp3.TlsVersion;
+ public peerCertificates(): java.util.List;
+ public peerPrincipal(): java.security.Principal;
+ public cipherSuite(): okhttp3.CipherSuite;
+ }
+}
+
+declare module okhttp3 {
+ export class Headers {
+ public static class: java.lang.Class;
+ public value(param0: number): string;
+ public equals(param0: any): boolean;
+ public newBuilder(): okhttp3.Headers.Builder;
+ public toString(): string;
+ public get(param0: string): string;
+ public values(param0: string): java.util.List;
+ public names(): java.util.Set;
+ public static of(param0: java.util.Map): okhttp3.Headers;
+ public name(param0: number): string;
+ public size(): number;
+ public hashCode(): number;
+ public toMultimap(): java.util.Map>;
+ public getDate(param0: string): java.util.Date;
+ public byteCount(): number;
+ public static of(param0: native.Array): okhttp3.Headers;
+ }
+ export module Headers {
+ export class Builder {
+ public static class: java.lang.Class;
+ public get(param0: string): string;
+ public build(): okhttp3.Headers;
+ public add(param0: string, param1: string): okhttp3.Headers.Builder;
+ public removeAll(param0: string): okhttp3.Headers.Builder;
+ public set(param0: string, param1: string): okhttp3.Headers.Builder;
+ public set(param0: string, param1: java.util.Date): okhttp3.Headers.Builder;
+ public constructor();
+ public addAll(param0: okhttp3.Headers): okhttp3.Headers.Builder;
+ public add(param0: string): okhttp3.Headers.Builder;
+ public addUnsafeNonAscii(param0: string, param1: string): okhttp3.Headers.Builder;
+ public add(param0: string, param1: java.util.Date): okhttp3.Headers.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class HttpUrl {
+ public static class: java.lang.Class;
+ public static get(param0: java.net.URI): okhttp3.HttpUrl;
+ public equals(param0: any): boolean;
+ public topPrivateDomain(): string;
+ public queryParameterName(param0: number): string;
+ public static defaultPort(param0: string): number;
+ public scheme(): string;
+ public queryParameterNames(): java.util.Set;
+ public encodedPassword(): string;
+ public queryParameter(param0: string): string;
+ public query(): string;
+ public password(): string;
+ public hashCode(): number;
+ public static get(param0: string): okhttp3.HttpUrl;
+ public resolve(param0: string): okhttp3.HttpUrl;
+ public pathSize(): number;
+ public isHttps(): boolean;
+ public encodedPathSegments(): java.util.List;
+ public newBuilder(): okhttp3.HttpUrl.Builder;
+ public port(): number;
+ public encodedQuery(): string;
+ public encodedPath(): string;
+ public encodedFragment(): string;
+ public redact(): string;
+ public fragment(): string;
+ public toString(): string;
+ public uri(): java.net.URI;
+ public queryParameterValue(param0: number): string;
+ public encodedUsername(): string;
+ public queryParameterValues(param0: string): java.util.List;
+ public newBuilder(param0: string): okhttp3.HttpUrl.Builder;
+ public host(): string;
+ public static get(param0: java.net.URL): okhttp3.HttpUrl;
+ public pathSegments(): java.util.List;
+ public static parse(param0: string): okhttp3.HttpUrl;
+ public url(): java.net.URL;
+ public querySize(): number;
+ public username(): string;
+ }
+ export module HttpUrl {
+ export class Builder {
+ public static class: java.lang.Class;
+ public addPathSegment(param0: string): okhttp3.HttpUrl.Builder;
+ public addEncodedPathSegment(param0: string): okhttp3.HttpUrl.Builder;
+ public setEncodedQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
+ public setQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
+ public encodedFragment(param0: string): okhttp3.HttpUrl.Builder;
+ public username(param0: string): okhttp3.HttpUrl.Builder;
+ public addPathSegments(param0: string): okhttp3.HttpUrl.Builder;
+ public encodedPath(param0: string): okhttp3.HttpUrl.Builder;
+ public encodedPassword(param0: string): okhttp3.HttpUrl.Builder;
+ public addEncodedPathSegments(param0: string): okhttp3.HttpUrl.Builder;
+ public encodedQuery(param0: string): okhttp3.HttpUrl.Builder;
+ public host(param0: string): okhttp3.HttpUrl.Builder;
+ public removeAllEncodedQueryParameters(param0: string): okhttp3.HttpUrl.Builder;
+ public setEncodedPathSegment(param0: number, param1: string): okhttp3.HttpUrl.Builder;
+ public constructor();
+ public encodedUsername(param0: string): okhttp3.HttpUrl.Builder;
+ public password(param0: string): okhttp3.HttpUrl.Builder;
+ public port(param0: number): okhttp3.HttpUrl.Builder;
+ public toString(): string;
+ public addQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
+ public addEncodedQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
+ public query(param0: string): okhttp3.HttpUrl.Builder;
+ public setPathSegment(param0: number, param1: string): okhttp3.HttpUrl.Builder;
+ public removeAllQueryParameters(param0: string): okhttp3.HttpUrl.Builder;
+ public scheme(param0: string): okhttp3.HttpUrl.Builder;
+ public removePathSegment(param0: number): okhttp3.HttpUrl.Builder;
+ public fragment(param0: string): okhttp3.HttpUrl.Builder;
+ public build(): okhttp3.HttpUrl;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Interceptor {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Interceptor interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ });
+ public constructor();
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ }
+ export module Interceptor {
+ export class Chain {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.Interceptor$Chain interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ request(): okhttp3.Request;
+ proceed(param0: okhttp3.Request): okhttp3.Response;
+ connection(): okhttp3.Connection;
+ call(): okhttp3.Call;
+ connectTimeoutMillis(): number;
+ withConnectTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ readTimeoutMillis(): number;
+ withReadTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ writeTimeoutMillis(): number;
+ withWriteTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ });
+ public constructor();
+ public request(): okhttp3.Request;
+ public withConnectTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public call(): okhttp3.Call;
+ public withWriteTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public readTimeoutMillis(): number;
+ public withReadTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public proceed(param0: okhttp3.Request): okhttp3.Response;
+ public connection(): okhttp3.Connection;
+ public connectTimeoutMillis(): number;
+ public writeTimeoutMillis(): number;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class MediaType {
+ public static class: java.lang.Class;
+ public type(): string;
+ public charset(): java.nio.charset.Charset;
+ public equals(param0: any): boolean;
+ public subtype(): string;
+ public static get(param0: string): okhttp3.MediaType;
+ public charset(param0: java.nio.charset.Charset): java.nio.charset.Charset;
+ public hashCode(): number;
+ public static parse(param0: string): okhttp3.MediaType;
+ public toString(): string;
+ }
+}
+
+declare module okhttp3 {
+ export class MultipartBody extends okhttp3.RequestBody {
+ public static class: java.lang.Class;
+ public static MIXED: okhttp3.MediaType;
+ public static ALTERNATIVE: okhttp3.MediaType;
+ public static DIGEST: okhttp3.MediaType;
+ public static PARALLEL: okhttp3.MediaType;
+ public static FORM: okhttp3.MediaType;
+ public boundary(): string;
+ public size(): number;
+ public parts(): java.util.List;
+ public type(): okhttp3.MediaType;
+ public contentType(): okhttp3.MediaType;
+ public writeTo(param0: okio.BufferedSink): void;
+ public part(param0: number): okhttp3.MultipartBody.Part;
+ public contentLength(): number;
+ }
+ export module MultipartBody {
+ export class Builder {
+ public static class: java.lang.Class;
+ public setType(param0: okhttp3.MediaType): okhttp3.MultipartBody.Builder;
+ public addPart(param0: okhttp3.MultipartBody.Part): okhttp3.MultipartBody.Builder;
+ public build(): okhttp3.MultipartBody;
+ public addPart(param0: okhttp3.Headers, param1: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
+ public addPart(param0: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
+ public constructor();
+ public addFormDataPart(param0: string, param1: string): okhttp3.MultipartBody.Builder;
+ public addFormDataPart(param0: string, param1: string, param2: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
+ public constructor(param0: string);
+ }
+ export class Part {
+ public static class: java.lang.Class;
+ public headers(): okhttp3.Headers;
+ public static create(param0: okhttp3.Headers, param1: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
+ public static createFormData(param0: string, param1: string, param2: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
+ public static create(param0: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
+ public static createFormData(param0: string, param1: string): okhttp3.MultipartBody.Part;
+ public body(): okhttp3.RequestBody;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class OkHttpClient implements okhttp3.Call.Factory, okhttp3.WebSocket.Factory {
+ public static class: java.lang.Class;
+ public proxy(): java.net.Proxy;
+ public sslSocketFactory(): javax.net.ssl.SSLSocketFactory;
+ public connectionPool(): okhttp3.ConnectionPool;
+ public cache(): okhttp3.Cache;
+ public certificatePinner(): okhttp3.CertificatePinner;
+ public dispatcher(): okhttp3.Dispatcher;
+ public protocols(): java.util.List;
+ public dns(): okhttp3.Dns;
+ public proxyAuthenticator(): okhttp3.Authenticator;
+ public callTimeoutMillis(): number;
+ public hostnameVerifier(): javax.net.ssl.HostnameVerifier;
+ public connectTimeoutMillis(): number;
+ public pingIntervalMillis(): number;
+ public cookieJar(): okhttp3.CookieJar;
+ public connectionSpecs(): java.util.List;
+ public newBuilder(): okhttp3.OkHttpClient.Builder;
+ public constructor();
+ public proxySelector(): java.net.ProxySelector;
+ public readTimeoutMillis(): number;
+ public authenticator(): okhttp3.Authenticator;
+ public followRedirects(): boolean;
+ public interceptors(): java.util.List;
+ public writeTimeoutMillis(): number;
+ public newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
+ public followSslRedirects(): boolean;
+ public socketFactory(): javax.net.SocketFactory;
+ public retryOnConnectionFailure(): boolean;
+ public networkInterceptors(): java.util.List;
+ public eventListenerFactory(): okhttp3.EventListener.Factory;
+ public newCall(param0: okhttp3.Request): okhttp3.Call;
+ }
+ export module OkHttpClient {
+ export class Builder {
+ public static class: java.lang.Class;
+ public protocols(param0: java.util.List): okhttp3.OkHttpClient.Builder;
+ public addInterceptor(param0: okhttp3.Interceptor): okhttp3.OkHttpClient.Builder;
+ public connectionPool(param0: okhttp3.ConnectionPool): okhttp3.OkHttpClient.Builder;
+ public interceptors(): java.util.List;
+ public readTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
+ public callTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
+ public dns(param0: okhttp3.Dns): okhttp3.OkHttpClient.Builder;
+ public writeTimeout(param0: java.time.Duration): okhttp3.OkHttpClient.Builder;
+ public readTimeout(param0: java.time.Duration): okhttp3.OkHttpClient.Builder;
+ public pingInterval(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
+ public eventListenerFactory(param0: okhttp3.EventListener.Factory): okhttp3.OkHttpClient.Builder;
+ public connectionSpecs(param0: java.util.List): okhttp3.OkHttpClient.Builder;
+ public build(): okhttp3.OkHttpClient;
+ public sslSocketFactory(param0: javax.net.ssl.SSLSocketFactory): okhttp3.OkHttpClient.Builder;
+ public eventListener(param0: okhttp3.EventListener): okhttp3.OkHttpClient.Builder;
+ public proxyAuthenticator(param0: okhttp3.Authenticator): okhttp3.OkHttpClient.Builder;
+ public followRedirects(param0: boolean): okhttp3.OkHttpClient.Builder;
+ public networkInterceptors(): java.util.List;
+ public cache(param0: okhttp3.Cache): okhttp3.OkHttpClient.Builder;
+ public sslSocketFactory(param0: javax.net.ssl.SSLSocketFactory, param1: javax.net.ssl.X509TrustManager): okhttp3.OkHttpClient.Builder;
+ public callTimeout(param0: java.time.Duration): okhttp3.OkHttpClient.Builder;
+ public cookieJar(param0: okhttp3.CookieJar): okhttp3.OkHttpClient.Builder;
+ public connectTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
+ public pingInterval(param0: java.time.Duration): okhttp3.OkHttpClient.Builder;
+ public followSslRedirects(param0: boolean): okhttp3.OkHttpClient.Builder;
+ public constructor();
+ public connectTimeout(param0: java.time.Duration): okhttp3.OkHttpClient.Builder;
+ public dispatcher(param0: okhttp3.Dispatcher): okhttp3.OkHttpClient.Builder;
+ public proxySelector(param0: java.net.ProxySelector): okhttp3.OkHttpClient.Builder;
+ public socketFactory(param0: javax.net.SocketFactory): okhttp3.OkHttpClient.Builder;
+ public retryOnConnectionFailure(param0: boolean): okhttp3.OkHttpClient.Builder;
+ public writeTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
+ public addNetworkInterceptor(param0: okhttp3.Interceptor): okhttp3.OkHttpClient.Builder;
+ public hostnameVerifier(param0: javax.net.ssl.HostnameVerifier): okhttp3.OkHttpClient.Builder;
+ public authenticator(param0: okhttp3.Authenticator): okhttp3.OkHttpClient.Builder;
+ public proxy(param0: java.net.Proxy): okhttp3.OkHttpClient.Builder;
+ public certificatePinner(param0: okhttp3.CertificatePinner): okhttp3.OkHttpClient.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Protocol {
+ public static class: java.lang.Class;
+ public static HTTP_1_0: okhttp3.Protocol;
+ public static HTTP_1_1: okhttp3.Protocol;
+ public static SPDY_3: okhttp3.Protocol;
+ public static HTTP_2: okhttp3.Protocol;
+ public static H2_PRIOR_KNOWLEDGE: okhttp3.Protocol;
+ public static QUIC: okhttp3.Protocol;
+ public static valueOf(param0: string): okhttp3.Protocol;
+ public static get(param0: string): okhttp3.Protocol;
+ public static values(): native.Array;
+ public toString(): string;
+ }
+}
+
+declare module okhttp3 {
+ export class RealCall extends okhttp3.Call {
+ public static class: java.lang.Class;
+ public clone(): okhttp3.RealCall;
+ public isExecuted(): boolean;
+ public clone(): okhttp3.Call;
+ public request(): okhttp3.Request;
+ public execute(): okhttp3.Response;
+ public isCanceled(): boolean;
+ public enqueue(param0: okhttp3.Callback): void;
+ public cancel(): void;
+ public timeout(): okio.Timeout;
+ }
+ export module RealCall {
+ export class AsyncCall extends okhttp3.internal.NamedRunnable {
+ public static class: java.lang.Class;
+ public execute(): void;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Request {
+ public static class: java.lang.Class;
+ public header(param0: string): string;
+ public headers(): okhttp3.Headers;
+ public tag(): any;
+ public newBuilder(): okhttp3.Request.Builder;
+ public headers(param0: string): java.util.List;
+ public url(): okhttp3.HttpUrl;
+ public tag(param0: java.lang.Class): any;
+ public cacheControl(): okhttp3.CacheControl;
+ public method(): string;
+ public toString(): string;
+ public body(): okhttp3.RequestBody;
+ public isHttps(): boolean;
+ }
+ export module Request {
+ export class Builder {
+ public static class: java.lang.Class;
+ public tag(param0: java.lang.Class, param1: any): okhttp3.Request.Builder;
+ public url(param0: okhttp3.HttpUrl): okhttp3.Request.Builder;
+ public tag(param0: any): okhttp3.Request.Builder;
+ public url(param0: java.net.URL): okhttp3.Request.Builder;
+ public header(param0: string, param1: string): okhttp3.Request.Builder;
+ public headers(param0: okhttp3.Headers): okhttp3.Request.Builder;
+ public put(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
+ public delete(): okhttp3.Request.Builder;
+ public get(): okhttp3.Request.Builder;
+ public constructor();
+ public addHeader(param0: string, param1: string): okhttp3.Request.Builder;
+ public post(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
+ public delete(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
+ public patch(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
+ public build(): okhttp3.Request;
+ public method(param0: string, param1: okhttp3.RequestBody): okhttp3.Request.Builder;
+ public url(param0: string): okhttp3.Request.Builder;
+ public removeHeader(param0: string): okhttp3.Request.Builder;
+ public cacheControl(param0: okhttp3.CacheControl): okhttp3.Request.Builder;
+ public head(): okhttp3.Request.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export abstract class RequestBody {
+ public static class: java.lang.Class;
+ public constructor();
+ public static create(param0: okhttp3.MediaType, param1: okio.ByteString): okhttp3.RequestBody;
+ public static create(param0: okhttp3.MediaType, param1: java.io.File): okhttp3.RequestBody;
+ public static create(param0: okhttp3.MediaType, param1: string): okhttp3.RequestBody;
+ public contentType(): okhttp3.MediaType;
+ public writeTo(param0: okio.BufferedSink): void;
+ public static create(param0: okhttp3.MediaType, param1: native.Array): okhttp3.RequestBody;
+ public contentLength(): number;
+ public static create(param0: okhttp3.MediaType, param1: native.Array, param2: number, param3: number): okhttp3.RequestBody;
+ }
+}
+
+declare module okhttp3 {
+ export class Response {
+ public static class: java.lang.Class;
+ public headers(): okhttp3.Headers;
+ public priorResponse(): okhttp3.Response;
+ public close(): void;
+ public cacheResponse(): okhttp3.Response;
+ public sentRequestAtMillis(): number;
+ public cacheControl(): okhttp3.CacheControl;
+ public toString(): string;
+ public handshake(): okhttp3.Handshake;
+ public peekBody(param0: number): okhttp3.ResponseBody;
+ public isSuccessful(): boolean;
+ public header(param0: string): string;
+ public header(param0: string, param1: string): string;
+ public body(): okhttp3.ResponseBody;
+ public networkResponse(): okhttp3.Response;
+ public headers(param0: string): java.util.List;
+ public newBuilder(): okhttp3.Response.Builder;
+ public request(): okhttp3.Request;
+ public code(): number;
+ public protocol(): okhttp3.Protocol;
+ public message(): string;
+ public challenges(): java.util.List;
+ public receivedResponseAtMillis(): number;
+ public isRedirect(): boolean;
+ }
+ export module Response {
+ export class Builder {
+ public static class: java.lang.Class;
+ public cacheResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
+ public body(param0: okhttp3.ResponseBody): okhttp3.Response.Builder;
+ public message(param0: string): okhttp3.Response.Builder;
+ public request(param0: okhttp3.Request): okhttp3.Response.Builder;
+ public header(param0: string, param1: string): okhttp3.Response.Builder;
+ public headers(param0: okhttp3.Headers): okhttp3.Response.Builder;
+ public sentRequestAtMillis(param0: number): okhttp3.Response.Builder;
+ public priorResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
+ public networkResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
+ public constructor();
+ public removeHeader(param0: string): okhttp3.Response.Builder;
+ public handshake(param0: okhttp3.Handshake): okhttp3.Response.Builder;
+ public addHeader(param0: string, param1: string): okhttp3.Response.Builder;
+ public code(param0: number): okhttp3.Response.Builder;
+ public build(): okhttp3.Response;
+ public protocol(param0: okhttp3.Protocol): okhttp3.Response.Builder;
+ public receivedResponseAtMillis(param0: number): okhttp3.Response.Builder;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export abstract class ResponseBody {
+ public static class: java.lang.Class;
+ public constructor();
+ public byteStream(): java.io.InputStream;
+ public bytes(): native.Array;
+ public static create(param0: okhttp3.MediaType, param1: native.Array): okhttp3.ResponseBody;
+ public static create(param0: okhttp3.MediaType, param1: number, param2: okio.BufferedSource): okhttp3.ResponseBody;
+ public close(): void;
+ public source(): okio.BufferedSource;
+ public static create(param0: okhttp3.MediaType, param1: okio.ByteString): okhttp3.ResponseBody;
+ public static create(param0: okhttp3.MediaType, param1: string): okhttp3.ResponseBody;
+ public charStream(): java.io.Reader;
+ public contentType(): okhttp3.MediaType;
+ public string(): string;
+ public contentLength(): number;
+ }
+ export module ResponseBody {
+ export class BomAwareReader {
+ public static class: java.lang.Class;
+ public read(param0: native.Array, param1: number, param2: number): number;
+ public close(): void;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export class Route {
+ public static class: java.lang.Class;
+ public proxy(): java.net.Proxy;
+ public constructor(param0: okhttp3.Address, param1: java.net.Proxy, param2: java.net.InetSocketAddress);
+ public equals(param0: any): boolean;
+ public address(): okhttp3.Address;
+ public hashCode(): number;
+ public toString(): string;
+ public requiresTunnel(): boolean;
+ public socketAddress(): java.net.InetSocketAddress;
+ }
+}
+
+declare module okhttp3 {
+ export class TlsVersion {
+ public static class: java.lang.Class;
+ public static TLS_1_3: okhttp3.TlsVersion;
+ public static TLS_1_2: okhttp3.TlsVersion;
+ public static TLS_1_1: okhttp3.TlsVersion;
+ public static TLS_1_0: okhttp3.TlsVersion;
+ public static SSL_3_0: okhttp3.TlsVersion;
+ public javaName(): string;
+ public static values(): native.Array;
+ public static valueOf(param0: string): okhttp3.TlsVersion;
+ public static forJavaName(param0: string): okhttp3.TlsVersion;
+ }
+}
+
+declare module okhttp3 {
+ export class WebSocket {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.WebSocket interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ request(): okhttp3.Request;
+ queueSize(): number;
+ send(param0: string): boolean;
+ send(param0: okio.ByteString): boolean;
+ close(param0: number, param1: string): boolean;
+ cancel(): void;
+ });
+ public constructor();
+ public send(param0: string): boolean;
+ public send(param0: okio.ByteString): boolean;
+ public close(param0: number, param1: string): boolean;
+ public request(): okhttp3.Request;
+ public queueSize(): number;
+ public cancel(): void;
+ }
+ export module WebSocket {
+ export class Factory {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.WebSocket$Factory interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
+ });
+ public constructor();
+ public newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export abstract class WebSocketListener {
+ public static class: java.lang.Class;
+ public constructor();
+ public onClosed(param0: okhttp3.WebSocket, param1: number, param2: string): void;
+ public onMessage(param0: okhttp3.WebSocket, param1: okio.ByteString): void;
+ public onFailure(param0: okhttp3.WebSocket, param1: java.lang.Throwable, param2: okhttp3.Response): void;
+ public onOpen(param0: okhttp3.WebSocket, param1: okhttp3.Response): void;
+ public onClosing(param0: okhttp3.WebSocket, param1: number, param2: string): void;
+ public onMessage(param0: okhttp3.WebSocket, param1: string): void;
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export abstract class Internal {
+ public static class: java.lang.Class;
+ public static instance: okhttp3.internal.Internal;
+ public code(param0: okhttp3.Response.Builder): number;
+ public addLenient(param0: okhttp3.Headers.Builder, param1: string): void;
+ public connectionBecameIdle(param0: okhttp3.ConnectionPool, param1: okhttp3.internal.connection.RealConnection): boolean;
+ public setCache(param0: okhttp3.OkHttpClient.Builder, param1: okhttp3.internal.cache.InternalCache): void;
+ public equalsNonHost(param0: okhttp3.Address, param1: okhttp3.Address): boolean;
+ public isInvalidHttpUrlHost(param0: java.lang.IllegalArgumentException): boolean;
+ public newWebSocketCall(param0: okhttp3.OkHttpClient, param1: okhttp3.Request): okhttp3.Call;
+ public constructor();
+ public apply(param0: okhttp3.ConnectionSpec, param1: javax.net.ssl.SSLSocket, param2: boolean): void;
+ public put(param0: okhttp3.ConnectionPool, param1: okhttp3.internal.connection.RealConnection): void;
+ public routeDatabase(param0: okhttp3.ConnectionPool): okhttp3.internal.connection.RouteDatabase;
+ public static initializeInstanceForTests(): void;
+ public addLenient(param0: okhttp3.Headers.Builder, param1: string, param2: string): void;
+ public deduplicate(param0: okhttp3.ConnectionPool, param1: okhttp3.Address, param2: okhttp3.internal.connection.StreamAllocation): java.net.Socket;
+ public timeoutExit(param0: okhttp3.Call, param1: java.io.IOException): java.io.IOException;
+ public get(param0: okhttp3.ConnectionPool, param1: okhttp3.Address, param2: okhttp3.internal.connection.StreamAllocation, param3: okhttp3.Route): okhttp3.internal.connection.RealConnection;
+ public streamAllocation(param0: okhttp3.Call): okhttp3.internal.connection.StreamAllocation;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export abstract class NamedRunnable {
+ public static class: java.lang.Class;
+ public name: string;
+ public execute(): void;
+ public constructor(param0: string, param1: native.Array);
+ public run(): void;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export class Util {
+ public static class: java.lang.Class;
+ public static EMPTY_BYTE_ARRAY: native.Array;
+ public static EMPTY_STRING_ARRAY: native.Array;
+ public static EMPTY_RESPONSE: okhttp3.ResponseBody;
+ public static EMPTY_REQUEST: okhttp3.RequestBody;
+ public static UTF_8: java.nio.charset.Charset;
+ public static ISO_8859_1: java.nio.charset.Charset;
+ public static UTC: java.util.TimeZone;
+ public static NATURAL_ORDER: java.util.Comparator;
+ public static checkOffsetAndCount(param0: number, param1: number, param2: number): void;
+ public static verifyAsIpAddress(param0: string): boolean;
+ public static equal(param0: any, param1: any): boolean;
+ public static bomAwareCharset(param0: okio.BufferedSource, param1: java.nio.charset.Charset): java.nio.charset.Charset;
+ public static platformTrustManager(): javax.net.ssl.X509TrustManager;
+ public static immutableMap(param0: java.util.Map): java.util.Map;
+ public static indexOf(param0: java.util.Comparator, param1: native.Array, param2: string): number;
+ public static format(param0: string, param1: native.Array): string;
+ public static decodeHexDigit(param0: string): number;
+ public static indexOfControlOrNonAscii(param0: string): number;
+ public static immutableList(param0: native.Array): java.util.List;
+ public static delimiterOffset(param0: string, param1: number, param2: number, param3: string): number;
+ public static closeQuietly(param0: java.io.Closeable): void;
+ public static hostHeader(param0: okhttp3.HttpUrl, param1: boolean): string;
+ public static trimSubstring(param0: string, param1: number, param2: number): string;
+ public static closeQuietly(param0: java.net.Socket): void;
+ public static assertionError(param0: string, param1: java.lang.Exception): java.lang.AssertionError;
+ public static skipTrailingAsciiWhitespace(param0: string, param1: number, param2: number): number;
+ public static checkDuration(param0: string, param1: number, param2: java.util.concurrent.TimeUnit): number;
+ public static intersect(param0: java.util.Comparator, param1: native.Array, param2: native.Array): native.Array;
+ public static canonicalizeHost(param0: string): string;
+ public static toHeaders(param0: java.util.List): okhttp3.Headers;
+ public static concat(param0: native.Array, param1: string): native.Array;
+ public static addSuppressedIfPossible(param0: java.lang.Throwable, param1: java.lang.Throwable): void;
+ public static nonEmptyIntersection(param0: java.util.Comparator, param1: native.Array, param2: native.Array): boolean;
+ public static closeQuietly(param0: java.net.ServerSocket): void;
+ public static discard(param0: okio.Source, param1: number, param2: java.util.concurrent.TimeUnit): boolean;
+ public static threadFactory(param0: string, param1: boolean): java.util.concurrent.ThreadFactory;
+ public static skipLeadingAsciiWhitespace(param0: string, param1: number, param2: number): number;
+ public static isAndroidGetsocknameError(param0: java.lang.AssertionError): boolean;
+ public static skipAll(param0: okio.Source, param1: number, param2: java.util.concurrent.TimeUnit): boolean;
+ public static immutableList(param0: java.util.List): java.util.List;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export class Version {
+ public static class: java.lang.Class;
+ public static userAgent(): string;
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module annotations {
+ export class EverythingIsNonNull {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.annotations.EverythingIsNonNull interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ });
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class CacheInterceptor extends okhttp3.Interceptor {
+ public static class: java.lang.Class;
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ public constructor(param0: okhttp3.internal.cache.InternalCache);
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class CacheRequest {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.cache.CacheRequest interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ body(): okio.Sink;
+ abort(): void;
+ });
+ public constructor();
+ public abort(): void;
+ public body(): okio.Sink;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class CacheStrategy {
+ public static class: java.lang.Class;
+ public networkRequest: okhttp3.Request;
+ public cacheResponse: okhttp3.Response;
+ public static isCacheable(param0: okhttp3.Response, param1: okhttp3.Request): boolean;
+ }
+ export module CacheStrategy {
+ export class Factory {
+ public static class: java.lang.Class;
+ public constructor(param0: number, param1: okhttp3.Request, param2: okhttp3.Response);
+ public get(): okhttp3.internal.cache.CacheStrategy;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class DiskLruCache {
+ public static class: java.lang.Class;
+ public remove(param0: string): boolean;
+ public close(): void;
+ public snapshots(): java.util.Iterator;
+ public isClosed(): boolean;
+ public getDirectory(): java.io.File;
+ public static create(param0: okhttp3.internal.io.FileSystem, param1: java.io.File, param2: number, param3: number, param4: number): okhttp3.internal.cache.DiskLruCache;
+ public get(param0: string): okhttp3.internal.cache.DiskLruCache.Snapshot;
+ public size(): number;
+ public flush(): void;
+ public setMaxSize(param0: number): void;
+ public edit(param0: string): okhttp3.internal.cache.DiskLruCache.Editor;
+ public initialize(): void;
+ public delete(): void;
+ public getMaxSize(): number;
+ public evictAll(): void;
+ }
+ export module DiskLruCache {
+ export class Editor {
+ public static class: java.lang.Class;
+ public newSource(param0: number): okio.Source;
+ public commit(): void;
+ public newSink(param0: number): okio.Sink;
+ public abortUnlessCommitted(): void;
+ public abort(): void;
+ }
+ export class Entry {
+ public static class: java.lang.Class;
+ }
+ export class Snapshot {
+ public static class: java.lang.Class;
+ public close(): void;
+ public key(): string;
+ public getLength(param0: number): number;
+ public edit(): okhttp3.internal.cache.DiskLruCache.Editor;
+ public getSource(param0: number): okio.Source;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class FaultHidingSink {
+ public static class: java.lang.Class;
+ public close(): void;
+ public write(param0: okio.Buffer, param1: number): void;
+ public flush(): void;
+ public onException(param0: java.io.IOException): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache {
+ export class InternalCache {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.cache.InternalCache interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ get(param0: okhttp3.Request): okhttp3.Response;
+ put(param0: okhttp3.Response): okhttp3.internal.cache.CacheRequest;
+ remove(param0: okhttp3.Request): void;
+ update(param0: okhttp3.Response, param1: okhttp3.Response): void;
+ trackConditionalCacheHit(): void;
+ trackResponse(param0: okhttp3.internal.cache.CacheStrategy): void;
+ });
+ public constructor();
+ public put(param0: okhttp3.Response): okhttp3.internal.cache.CacheRequest;
+ public get(param0: okhttp3.Request): okhttp3.Response;
+ public remove(param0: okhttp3.Request): void;
+ public update(param0: okhttp3.Response, param1: okhttp3.Response): void;
+ public trackConditionalCacheHit(): void;
+ public trackResponse(param0: okhttp3.internal.cache.CacheStrategy): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache2 {
+ export class FileOperator {
+ public static class: java.lang.Class;
+ public write(param0: number, param1: okio.Buffer, param2: number): void;
+ public read(param0: number, param1: okio.Buffer, param2: number): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module cache2 {
+ export class Relay {
+ public static class: java.lang.Class;
+ public newSource(): okio.Source;
+ public metadata(): okio.ByteString;
+ public static edit(param0: java.io.File, param1: okio.Source, param2: okio.ByteString, param3: number): okhttp3.internal.cache2.Relay;
+ public static read(param0: java.io.File): okhttp3.internal.cache2.Relay;
+ }
+ export module Relay {
+ export class RelaySource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public timeout(): okio.Timeout;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class ConnectInterceptor extends okhttp3.Interceptor {
+ public static class: java.lang.Class;
+ public client: okhttp3.OkHttpClient;
+ public constructor(param0: okhttp3.OkHttpClient);
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class ConnectionSpecSelector {
+ public static class: java.lang.Class;
+ public constructor(param0: java.util.List);
+ public configureSecureSocket(param0: javax.net.ssl.SSLSocket): okhttp3.ConnectionSpec;
+ public connectionFailed(param0: java.io.IOException): boolean;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class RealConnection extends okhttp3.internal.http2.Http2Connection.Listener implements okhttp3.Connection {
+ public static class: java.lang.Class;
+ public noNewStreams: boolean;
+ public successCount: number;
+ public allocationLimit: number;
+ public allocations: java.util.List>;
+ public idleAtNanos: number;
+ public onSettings(param0: okhttp3.internal.http2.Http2Connection): void;
+ public connect(param0: number, param1: number, param2: number, param3: number, param4: boolean, param5: okhttp3.Call, param6: okhttp3.EventListener): void;
+ public isEligible(param0: okhttp3.Address, param1: okhttp3.Route): boolean;
+ public protocol(): okhttp3.Protocol;
+ public route(): okhttp3.Route;
+ public toString(): string;
+ public socket(): java.net.Socket;
+ public onStream(param0: okhttp3.internal.http2.Http2Stream): void;
+ public constructor();
+ public constructor(param0: okhttp3.ConnectionPool, param1: okhttp3.Route);
+ public isHealthy(param0: boolean): boolean;
+ public supportsUrl(param0: okhttp3.HttpUrl): boolean;
+ public newWebSocketStreams(param0: okhttp3.internal.connection.StreamAllocation): okhttp3.internal.ws.RealWebSocket.Streams;
+ public cancel(): void;
+ public isMultiplexed(): boolean;
+ public static testConnection(param0: okhttp3.ConnectionPool, param1: okhttp3.Route, param2: java.net.Socket, param3: number): okhttp3.internal.connection.RealConnection;
+ public handshake(): okhttp3.Handshake;
+ public newCodec(param0: okhttp3.OkHttpClient, param1: okhttp3.Interceptor.Chain, param2: okhttp3.internal.connection.StreamAllocation): okhttp3.internal.http.HttpCodec;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class RouteDatabase {
+ public static class: java.lang.Class;
+ public shouldPostpone(param0: okhttp3.Route): boolean;
+ public connected(param0: okhttp3.Route): void;
+ public failed(param0: okhttp3.Route): void;
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class RouteException {
+ public static class: java.lang.Class;
+ public getLastConnectException(): java.io.IOException;
+ public constructor(param0: java.io.IOException);
+ public addConnectException(param0: java.io.IOException): void;
+ public getFirstConnectException(): java.io.IOException;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class RouteSelector {
+ public static class: java.lang.Class;
+ public next(): okhttp3.internal.connection.RouteSelector.Selection;
+ public constructor(param0: okhttp3.Address, param1: okhttp3.internal.connection.RouteDatabase, param2: okhttp3.Call, param3: okhttp3.EventListener);
+ public hasNext(): boolean;
+ public connectFailed(param0: okhttp3.Route, param1: java.io.IOException): void;
+ }
+ export module RouteSelector {
+ export class Selection {
+ public static class: java.lang.Class;
+ public getAll(): java.util.List;
+ public next(): okhttp3.Route;
+ public hasNext(): boolean;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module connection {
+ export class StreamAllocation {
+ public static class: java.lang.Class;
+ public address: okhttp3.Address;
+ public call: okhttp3.Call;
+ public eventListener: okhttp3.EventListener;
+ public streamFinished(param0: boolean, param1: okhttp3.internal.http.HttpCodec, param2: number, param3: java.io.IOException): void;
+ public release(): void;
+ public codec(): okhttp3.internal.http.HttpCodec;
+ public route(): okhttp3.Route;
+ public toString(): string;
+ public newStream(param0: okhttp3.OkHttpClient, param1: okhttp3.Interceptor.Chain, param2: boolean): okhttp3.internal.http.HttpCodec;
+ public releaseAndAcquire(param0: okhttp3.internal.connection.RealConnection): java.net.Socket;
+ public noNewStreams(): void;
+ public acquire(param0: okhttp3.internal.connection.RealConnection, param1: boolean): void;
+ public cancel(): void;
+ public connection(): okhttp3.internal.connection.RealConnection;
+ public hasMoreRoutes(): boolean;
+ public constructor(param0: okhttp3.ConnectionPool, param1: okhttp3.Address, param2: okhttp3.Call, param3: okhttp3.EventListener, param4: any);
+ public streamFailed(param0: java.io.IOException): void;
+ }
+ export module StreamAllocation {
+ export class StreamAllocationReference extends java.lang.ref.WeakReference {
+ public static class: java.lang.Class;
+ public callStackTrace: any;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class BridgeInterceptor extends okhttp3.Interceptor {
+ public static class: java.lang.Class;
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ public constructor(param0: okhttp3.CookieJar);
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class CallServerInterceptor extends okhttp3.Interceptor {
+ public static class: java.lang.Class;
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ public constructor(param0: boolean);
+ }
+ export module CallServerInterceptor {
+ export class CountingSink {
+ public static class: java.lang.Class;
+ public write(param0: okio.Buffer, param1: number): void;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class HttpCodec {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.http.HttpCodec interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ createRequestBody(param0: okhttp3.Request, param1: number): okio.Sink;
+ writeRequestHeaders(param0: okhttp3.Request): void;
+ flushRequest(): void;
+ finishRequest(): void;
+ readResponseHeaders(param0: boolean): okhttp3.Response.Builder;
+ openResponseBody(param0: okhttp3.Response): okhttp3.ResponseBody;
+ cancel(): void;
+ });
+ public constructor();
+ public static DISCARD_STREAM_TIMEOUT_MILLIS: number;
+ public finishRequest(): void;
+ public openResponseBody(param0: okhttp3.Response): okhttp3.ResponseBody;
+ public readResponseHeaders(param0: boolean): okhttp3.Response.Builder;
+ public cancel(): void;
+ public flushRequest(): void;
+ public createRequestBody(param0: okhttp3.Request, param1: number): okio.Sink;
+ public writeRequestHeaders(param0: okhttp3.Request): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class HttpDate {
+ public static class: java.lang.Class;
+ public static MAX_DATE: number;
+ public static parse(param0: string): java.util.Date;
+ public static format(param0: java.util.Date): string;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class HttpHeaders {
+ public static class: java.lang.Class;
+ public static varyHeaders(param0: okhttp3.Headers, param1: okhttp3.Headers): okhttp3.Headers;
+ public static hasBody(param0: okhttp3.Response): boolean;
+ public static receiveHeaders(param0: okhttp3.CookieJar, param1: okhttp3.HttpUrl, param2: okhttp3.Headers): void;
+ public static varyHeaders(param0: okhttp3.Response): okhttp3.Headers;
+ public static varyMatches(param0: okhttp3.Response, param1: okhttp3.Headers, param2: okhttp3.Request): boolean;
+ public static skipWhitespace(param0: string, param1: number): number;
+ public static hasVaryAll(param0: okhttp3.Headers): boolean;
+ public static contentLength(param0: okhttp3.Response): number;
+ public static hasVaryAll(param0: okhttp3.Response): boolean;
+ public static skipUntil(param0: string, param1: number, param2: string): number;
+ public static varyFields(param0: okhttp3.Headers): java.util.Set;
+ public static contentLength(param0: okhttp3.Headers): number;
+ public static parseChallenges(param0: okhttp3.Headers, param1: string): java.util.List;
+ public static parseSeconds(param0: string, param1: number): number;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class HttpMethod {
+ public static class: java.lang.Class;
+ public static invalidatesCache(param0: string): boolean;
+ public static requiresRequestBody(param0: string): boolean;
+ public static permitsRequestBody(param0: string): boolean;
+ public static redirectsWithBody(param0: string): boolean;
+ public static redirectsToGet(param0: string): boolean;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class RealInterceptorChain extends okhttp3.Interceptor.Chain {
+ public static class: java.lang.Class;
+ public request(): okhttp3.Request;
+ public httpStream(): okhttp3.internal.http.HttpCodec;
+ public connectTimeoutMillis(): number;
+ public constructor(param0: java.util.List, param1: okhttp3.internal.connection.StreamAllocation, param2: okhttp3.internal.http.HttpCodec, param3: okhttp3.internal.connection.RealConnection, param4: number, param5: okhttp3.Request, param6: okhttp3.Call, param7: okhttp3.EventListener, param8: number, param9: number, param10: number);
+ public proceed(param0: okhttp3.Request, param1: okhttp3.internal.connection.StreamAllocation, param2: okhttp3.internal.http.HttpCodec, param3: okhttp3.internal.connection.RealConnection): okhttp3.Response;
+ public withWriteTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public connection(): okhttp3.Connection;
+ public writeTimeoutMillis(): number;
+ public readTimeoutMillis(): number;
+ public call(): okhttp3.Call;
+ public withConnectTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public proceed(param0: okhttp3.Request): okhttp3.Response;
+ public eventListener(): okhttp3.EventListener;
+ public withReadTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.Interceptor.Chain;
+ public streamAllocation(): okhttp3.internal.connection.StreamAllocation;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class RealResponseBody extends okhttp3.ResponseBody {
+ public static class: java.lang.Class;
+ public contentLength(): number;
+ public constructor(param0: string, param1: number, param2: okio.BufferedSource);
+ public source(): okio.BufferedSource;
+ public contentType(): okhttp3.MediaType;
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class RequestLine {
+ public static class: java.lang.Class;
+ public static requestPath(param0: okhttp3.HttpUrl): string;
+ public static get(param0: okhttp3.Request, param1: java.net.Proxy.Type): string;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class RetryAndFollowUpInterceptor extends okhttp3.Interceptor {
+ public static class: java.lang.Class;
+ public isCanceled(): boolean;
+ public setCallStackTrace(param0: any): void;
+ public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
+ public constructor(param0: okhttp3.OkHttpClient, param1: boolean);
+ public cancel(): void;
+ public streamAllocation(): okhttp3.internal.connection.StreamAllocation;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class StatusLine {
+ public static class: java.lang.Class;
+ public static HTTP_TEMP_REDIRECT: number;
+ public static HTTP_PERM_REDIRECT: number;
+ public static HTTP_CONTINUE: number;
+ public protocol: okhttp3.Protocol;
+ public code: number;
+ public message: string;
+ public constructor(param0: okhttp3.Protocol, param1: number, param2: string);
+ public static parse(param0: string): okhttp3.internal.http.StatusLine;
+ public toString(): string;
+ public static get(param0: okhttp3.Response): okhttp3.internal.http.StatusLine;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http {
+ export class UnrepeatableRequestBody {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.http.UnrepeatableRequestBody interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ });
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http1 {
+ export class Http1Codec extends okhttp3.internal.http.HttpCodec {
+ public static class: java.lang.Class;
+ public finishRequest(): void;
+ public newFixedLengthSink(param0: number): okio.Sink;
+ public newChunkedSink(): okio.Sink;
+ public constructor(param0: okhttp3.OkHttpClient, param1: okhttp3.internal.connection.StreamAllocation, param2: okio.BufferedSource, param3: okio.BufferedSink);
+ public isClosed(): boolean;
+ public readResponseHeaders(param0: boolean): okhttp3.Response.Builder;
+ public writeRequestHeaders(param0: okhttp3.Request): void;
+ public writeRequest(param0: okhttp3.Headers, param1: string): void;
+ public openResponseBody(param0: okhttp3.Response): okhttp3.ResponseBody;
+ public newUnknownLengthSource(): okio.Source;
+ public readHeaders(): okhttp3.Headers;
+ public newChunkedSource(param0: okhttp3.HttpUrl): okio.Source;
+ public cancel(): void;
+ public flushRequest(): void;
+ public createRequestBody(param0: okhttp3.Request, param1: number): okio.Sink;
+ public newFixedLengthSource(param0: number): okio.Source;
+ }
+ export module Http1Codec {
+ export abstract class AbstractSource {
+ public static class: java.lang.Class;
+ public closed: boolean;
+ public bytesRead: number;
+ public endOfInput(param0: boolean, param1: java.io.IOException): void;
+ public timeout(): okio.Timeout;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ export class ChunkedSink {
+ public static class: java.lang.Class;
+ public close(): void;
+ public flush(): void;
+ public write(param0: okio.Buffer, param1: number): void;
+ public timeout(): okio.Timeout;
+ }
+ export class ChunkedSource extends okhttp3.internal.http1.Http1Codec.AbstractSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ export class FixedLengthSink {
+ public static class: java.lang.Class;
+ public close(): void;
+ public flush(): void;
+ public write(param0: okio.Buffer, param1: number): void;
+ public timeout(): okio.Timeout;
+ }
+ export class FixedLengthSource extends okhttp3.internal.http1.Http1Codec.AbstractSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ export class UnknownLengthSource extends okhttp3.internal.http1.Http1Codec.AbstractSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class ConnectionShutdownException {
+ public static class: java.lang.Class;
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class ErrorCode {
+ public static class: java.lang.Class;
+ public static NO_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static PROTOCOL_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static INTERNAL_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static FLOW_CONTROL_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static REFUSED_STREAM: okhttp3.internal.http2.ErrorCode;
+ public static CANCEL: okhttp3.internal.http2.ErrorCode;
+ public static COMPRESSION_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static CONNECT_ERROR: okhttp3.internal.http2.ErrorCode;
+ public static ENHANCE_YOUR_CALM: okhttp3.internal.http2.ErrorCode;
+ public static INADEQUATE_SECURITY: okhttp3.internal.http2.ErrorCode;
+ public static HTTP_1_1_REQUIRED: okhttp3.internal.http2.ErrorCode;
+ public httpCode: number;
+ public static valueOf(param0: string): okhttp3.internal.http2.ErrorCode;
+ public static fromHttp2(param0: number): okhttp3.internal.http2.ErrorCode;
+ public static values(): native.Array;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Header {
+ public static class: java.lang.Class;
+ public static PSEUDO_PREFIX: okio.ByteString;
+ public static RESPONSE_STATUS_UTF8: string;
+ public static TARGET_METHOD_UTF8: string;
+ public static TARGET_PATH_UTF8: string;
+ public static TARGET_SCHEME_UTF8: string;
+ public static TARGET_AUTHORITY_UTF8: string;
+ public static RESPONSE_STATUS: okio.ByteString;
+ public static TARGET_METHOD: okio.ByteString;
+ public static TARGET_PATH: okio.ByteString;
+ public static TARGET_SCHEME: okio.ByteString;
+ public static TARGET_AUTHORITY: okio.ByteString;
+ public name: okio.ByteString;
+ public value: okio.ByteString;
+ public constructor(param0: okio.ByteString, param1: okio.ByteString);
+ public hashCode(): number;
+ public equals(param0: any): boolean;
+ public constructor(param0: okio.ByteString, param1: string);
+ public toString(): string;
+ public constructor(param0: string, param1: string);
+ }
+ export module Header {
+ export class Listener {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.http2.Header$Listener interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ onHeaders(param0: okhttp3.Headers): void;
+ });
+ public constructor();
+ public onHeaders(param0: okhttp3.Headers): void;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Hpack {
+ public static class: java.lang.Class;
+ }
+ export module Hpack {
+ export class Reader {
+ public static class: java.lang.Class;
+ public getAndResetHeaderList(): java.util.List;
+ }
+ export class Writer {
+ public static class: java.lang.Class;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2 {
+ public static class: java.lang.Class;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2Codec extends okhttp3.internal.http.HttpCodec {
+ public static class: java.lang.Class;
+ public finishRequest(): void;
+ public static readHttp2HeadersList(param0: okhttp3.Headers, param1: okhttp3.Protocol): okhttp3.Response.Builder;
+ public openResponseBody(param0: okhttp3.Response): okhttp3.ResponseBody;
+ public readResponseHeaders(param0: boolean): okhttp3.Response.Builder;
+ public cancel(): void;
+ public constructor(param0: okhttp3.OkHttpClient, param1: okhttp3.Interceptor.Chain, param2: okhttp3.internal.connection.StreamAllocation, param3: okhttp3.internal.http2.Http2Connection);
+ public flushRequest(): void;
+ public createRequestBody(param0: okhttp3.Request, param1: number): okio.Sink;
+ public writeRequestHeaders(param0: okhttp3.Request): void;
+ public static http2HeadersList(param0: okhttp3.Request): java.util.List;
+ }
+ export module Http2Codec {
+ export class StreamFinishingSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2Connection {
+ public static class: java.lang.Class;
+ public maxConcurrentStreams(): number;
+ public pushStream(param0: number, param1: java.util.List, param2: boolean): okhttp3.internal.http2.Http2Stream;
+ public writeData(param0: number, param1: boolean, param2: okio.Buffer, param3: number): void;
+ public close(): void;
+ public start(): void;
+ public newStream(param0: java.util.List, param1: boolean): okhttp3.internal.http2.Http2Stream;
+ public isShutdown(): boolean;
+ public openStreamCount(): number;
+ public shutdown(param0: okhttp3.internal.http2.ErrorCode): void;
+ public setSettings(param0: okhttp3.internal.http2.Settings): void;
+ public getProtocol(): okhttp3.Protocol;
+ public flush(): void;
+ }
+ export module Http2Connection {
+ export class Builder {
+ public static class: java.lang.Class;
+ public constructor(param0: boolean);
+ public listener(param0: okhttp3.internal.http2.Http2Connection.Listener): okhttp3.internal.http2.Http2Connection.Builder;
+ public pingIntervalMillis(param0: number): okhttp3.internal.http2.Http2Connection.Builder;
+ public build(): okhttp3.internal.http2.Http2Connection;
+ public socket(param0: java.net.Socket, param1: string, param2: okio.BufferedSource, param3: okio.BufferedSink): okhttp3.internal.http2.Http2Connection.Builder;
+ public socket(param0: java.net.Socket): okhttp3.internal.http2.Http2Connection.Builder;
+ public pushObserver(param0: okhttp3.internal.http2.PushObserver): okhttp3.internal.http2.Http2Connection.Builder;
+ }
+ export abstract class Listener {
+ public static class: java.lang.Class;
+ public static REFUSE_INCOMING_STREAMS: okhttp3.internal.http2.Http2Connection.Listener;
+ public onStream(param0: okhttp3.internal.http2.Http2Stream): void;
+ public constructor();
+ public onSettings(param0: okhttp3.internal.http2.Http2Connection): void;
+ }
+ export class PingRunnable extends okhttp3.internal.NamedRunnable {
+ public static class: java.lang.Class;
+ public execute(): void;
+ }
+ export class ReaderRunnable extends okhttp3.internal.NamedRunnable implements okhttp3.internal.http2.Http2Reader.Handler {
+ public static class: java.lang.Class;
+ public settings(param0: boolean, param1: okhttp3.internal.http2.Settings): void;
+ public alternateService(param0: number, param1: string, param2: okio.ByteString, param3: string, param4: number, param5: number): void;
+ public ackSettings(): void;
+ public data(param0: boolean, param1: number, param2: okio.BufferedSource, param3: number): void;
+ public headers(param0: boolean, param1: number, param2: number, param3: java.util.List): void;
+ public priority(param0: number, param1: number, param2: number, param3: boolean): void;
+ public execute(): void;
+ public pushPromise(param0: number, param1: number, param2: java.util.List): void;
+ public rstStream(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ public goAway(param0: number, param1: okhttp3.internal.http2.ErrorCode, param2: okio.ByteString): void;
+ public windowUpdate(param0: number, param1: number): void;
+ public ping(param0: boolean, param1: number, param2: number): void;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2Reader {
+ public static class: java.lang.Class;
+ public close(): void;
+ public nextFrame(param0: boolean, param1: okhttp3.internal.http2.Http2Reader.Handler): boolean;
+ public readConnectionPreface(param0: okhttp3.internal.http2.Http2Reader.Handler): void;
+ }
+ export module Http2Reader {
+ export class ContinuationSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public timeout(): okio.Timeout;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ export class Handler {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.http2.Http2Reader$Handler interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ data(param0: boolean, param1: number, param2: okio.BufferedSource, param3: number): void;
+ headers(param0: boolean, param1: number, param2: number, param3: java.util.List): void;
+ rstStream(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ settings(param0: boolean, param1: okhttp3.internal.http2.Settings): void;
+ ackSettings(): void;
+ ping(param0: boolean, param1: number, param2: number): void;
+ goAway(param0: number, param1: okhttp3.internal.http2.ErrorCode, param2: okio.ByteString): void;
+ windowUpdate(param0: number, param1: number): void;
+ priority(param0: number, param1: number, param2: number, param3: boolean): void;
+ pushPromise(param0: number, param1: number, param2: java.util.List): void;
+ alternateService(param0: number, param1: string, param2: okio.ByteString, param3: string, param4: number, param5: number): void;
+ });
+ public constructor();
+ public settings(param0: boolean, param1: okhttp3.internal.http2.Settings): void;
+ public alternateService(param0: number, param1: string, param2: okio.ByteString, param3: string, param4: number, param5: number): void;
+ public ackSettings(): void;
+ public data(param0: boolean, param1: number, param2: okio.BufferedSource, param3: number): void;
+ public headers(param0: boolean, param1: number, param2: number, param3: java.util.List): void;
+ public priority(param0: number, param1: number, param2: number, param3: boolean): void;
+ public pushPromise(param0: number, param1: number, param2: java.util.List): void;
+ public rstStream(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ public goAway(param0: number, param1: okhttp3.internal.http2.ErrorCode, param2: okio.ByteString): void;
+ public windowUpdate(param0: number, param1: number): void;
+ public ping(param0: boolean, param1: number, param2: number): void;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2Stream {
+ public static class: java.lang.Class;
+ public getSource(): okio.Source;
+ public close(param0: okhttp3.internal.http2.ErrorCode): void;
+ public closeLater(param0: okhttp3.internal.http2.ErrorCode): void;
+ public writeTimeout(): okio.Timeout;
+ public getId(): number;
+ public writeHeaders(param0: java.util.List, param1: boolean): void;
+ public getErrorCode(): okhttp3.internal.http2.ErrorCode;
+ public takeHeaders(): okhttp3.Headers;
+ public getConnection(): okhttp3.internal.http2.Http2Connection;
+ public isOpen(): boolean;
+ public readTimeout(): okio.Timeout;
+ public getSink(): okio.Sink;
+ public isLocallyInitiated(): boolean;
+ public setHeadersListener(param0: okhttp3.internal.http2.Header.Listener): void;
+ }
+ export module Http2Stream {
+ export class FramingSink {
+ public static class: java.lang.Class;
+ public close(): void;
+ public flush(): void;
+ public write(param0: okio.Buffer, param1: number): void;
+ public timeout(): okio.Timeout;
+ }
+ export class FramingSource {
+ public static class: java.lang.Class;
+ public close(): void;
+ public timeout(): okio.Timeout;
+ public read(param0: okio.Buffer, param1: number): number;
+ }
+ export class StreamTimeout {
+ public static class: java.lang.Class;
+ public timedOut(): void;
+ public newTimeoutException(param0: java.io.IOException): java.io.IOException;
+ public exitAndThrowIfTimedOut(): void;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Http2Writer {
+ public static class: java.lang.Class;
+ public headers(param0: number, param1: java.util.List): void;
+ public close(): void;
+ public synStream(param0: boolean, param1: number, param2: number, param3: java.util.List): void;
+ public settings(param0: okhttp3.internal.http2.Settings): void;
+ public ping(param0: boolean, param1: number, param2: number): void;
+ public windowUpdate(param0: number, param1: number): void;
+ public frameHeader(param0: number, param1: number, param2: number, param3: number): void;
+ public maxDataLength(): number;
+ public goAway(param0: number, param1: okhttp3.internal.http2.ErrorCode, param2: native.Array): void;
+ public flush(): void;
+ public connectionPreface(): void;
+ public pushPromise(param0: number, param1: number, param2: java.util.List): void;
+ public data(param0: boolean, param1: number, param2: okio.Buffer, param3: number): void;
+ public rstStream(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ public synReply(param0: boolean, param1: number, param2: java.util.List): void;
+ public applyAndAckSettings(param0: okhttp3.internal.http2.Settings): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Huffman {
+ public static class: java.lang.Class;
+ public static get(): okhttp3.internal.http2.Huffman;
+ }
+ export module Huffman {
+ export class Node {
+ public static class: java.lang.Class;
+ }
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class PushObserver {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.http2.PushObserver interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ onRequest(param0: number, param1: java.util.List): boolean;
+ onHeaders(param0: number, param1: java.util.List, param2: boolean): boolean;
+ onData(param0: number, param1: okio.BufferedSource, param2: number, param3: boolean): boolean;
+ onReset(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ (): void;
+ });
+ public constructor();
+ public static CANCEL: okhttp3.internal.http2.PushObserver;
+ public onRequest(param0: number, param1: java.util.List): boolean;
+ public onHeaders(param0: number, param1: java.util.List, param2: boolean): boolean;
+ public onData(param0: number, param1: okio.BufferedSource, param2: number, param3: boolean): boolean;
+ public onReset(param0: number, param1: okhttp3.internal.http2.ErrorCode): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class Settings {
+ public static class: java.lang.Class;
+ public constructor();
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module http2 {
+ export class StreamResetException {
+ public static class: java.lang.Class;
+ public errorCode: okhttp3.internal.http2.ErrorCode;
+ public constructor(param0: okhttp3.internal.http2.ErrorCode);
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module io {
+ export class FileSystem {
+ public static class: java.lang.Class;
+ /**
+ * Constructs a new instance of the okhttp3.internal.io.FileSystem interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
+ */
+ public constructor(implementation: {
+ source(param0: java.io.File): okio.Source;
+ sink(param0: java.io.File): okio.Sink;
+ appendingSink(param0: java.io.File): okio.Sink;
+ delete(param0: java.io.File): void;
+ exists(param0: java.io.File): boolean;
+ size(param0: java.io.File): number;
+ rename(param0: java.io.File, param1: java.io.File): void;
+ deleteContents(param0: java.io.File): void;
+ (): void;
+ });
+ public constructor();
+ public static SYSTEM: okhttp3.internal.io.FileSystem;
+ public source(param0: java.io.File): okio.Source;
+ public size(param0: java.io.File): number;
+ public deleteContents(param0: java.io.File): void;
+ public appendingSink(param0: java.io.File): okio.Sink;
+ public sink(param0: java.io.File): okio.Sink;
+ public exists(param0: java.io.File): boolean;
+ public rename(param0: java.io.File, param1: java.io.File): void;
+ public delete(param0: java.io.File): void;
+ }
+ }
+ }
+}
+
+declare module okhttp3 {
+ export module internal {
+ export module platform {
+ export class AndroidPlatform extends okhttp3.internal.platform.Platform {
+ public static class: java.lang.Class;
+ public connectSocket(param0: java.net.Socket, param1: java.net.InetSocketAddress, param2: number): void;
+ public configureTlsExtensions(param0: javax.net.ssl.SSLSocket, param1: string, param2: java.util.List): void;
+ public log(param0: number, param1: string, param2: java.lang.Throwable): void;
+ public logCloseableLeak(param0: string, param1: any): void;
+ public buildTrustRootIndex(param0: javax.net.ssl.X509TrustManager): okhttp3.internal.tls.TrustRootIndex;
+ public isCleartextTrafficPermitted(param0: string): boolean;
+ public buildCertificateChainCleaner(param0: javax.net.ssl.X509TrustManager): okhttp3.internal.tls.CertificateChainCleaner;
+ public buildCertificateChainCleaner(param0: javax.net.ssl.SSLSocketFactory): okhttp3.internal.tls.CertificateChainCleaner;
+ public getSelectedProtocol(param0: javax.net.ssl.SSLSocket): string;
+ public trustManager(param0: javax.net.ssl.SSLSocketFactory): javax.net.ssl.X509TrustManager;
+ public getStackTraceForCloseable(param0: string): any;
+ public static buildIfSupported(): okhttp3.internal.platform.Platform;
+ public getSSLContext(): javax.net.ssl.SSLContext;
+ }
+ export module AndroidPlatform {
+ export class AndroidCertificateChainCleaner extends okhttp3.internal.tls.CertificateChainCleaner {
+ public static class: java.lang.Class;
+ public equals(param0: any): boolean;
+ public clean(param0: java.util.List, param1: string): java.util.List