Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/https.js
6174 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's https module. Depends on the tls module.
19
* @see http://nodejs.org/api/https.html
20
* @see https://github.com/joyent/node/blob/master/lib/https.js
21
* @externs
22
*/
23
24
/**
25
BEGIN_NODE_INCLUDE
26
var https = require('https');
27
END_NODE_INCLUDE
28
*/
29
30
var https = {};
31
32
/**
33
* @constructor
34
* @extends tls.Server
35
*/
36
https.Server = function() {};
37
38
/**
39
* @param {...*} var_args
40
*/
41
https.Server.prototype.listen = function(var_args) {};
42
43
/**
44
* @param {function()=} callback
45
*/
46
https.Server.prototype.close = function(callback) {};
47
48
/**
49
* @param {tls.CreateOptions} options
50
* @param {function(http.IncomingMessage, http.ServerResponse)=} requestListener
51
*/
52
https.createServer = function(options, requestListener) {};
53
54
/**
55
* @typedef {{host: ?string, hostname: ?string, port: ?number, method: ?string, path: ?string, headers: ?Object.<string,string>, auth: ?string, agent: ?(https.Agent|boolean), pfx: ?(string|nodeBuffer.Buffer), key: ?(string|nodeBuffer.Buffer), passphrase: ?string, cert: ?(string|nodeBuffer.Buffer), ca: ?Array.<string>, ciphers: ?string, rejectUnauthorized: ?boolean}}
56
*/
57
https.ConnectOptions;
58
59
/**
60
* @param {https.ConnectOptions|string} options
61
* @param {function(http.IncomingMessage)} callback
62
* @return {http.ClientRequest}
63
*/
64
https.request = function(options, callback) {};
65
66
/**
67
* @param {https.ConnectOptions|string} options
68
* @param {function(http.IncomingMessage)} callback
69
* @return {http.ClientRequest}
70
*/
71
https.get = function(options, callback) {};
72
73
/**
74
* @constructor
75
* @extends http.Agent
76
*/
77
https.Agent = function() {};
78
79
/**
80
* @type {https.Agent}
81
*/
82
https.globalAgent;
83
84