forked from KOBA789/node.js_ja
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhttps.json
More file actions
165 lines (165 loc) · 15.6 KB
/
Copy pathhttps.json
File metadata and controls
165 lines (165 loc) · 15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
"source": "doc/api/https.markdown",
"modules": [
{
"textRaw": "HTTPS",
"name": "https",
"stability": 3,
"stabilityText": "Stable",
"desc": "<!--\nHTTPS is the HTTP protocol over TLS/SSL. In Node this is implemented as a\nseparate module.\n-->\n\n<p>HTTPS は TLS/SSL 上の HTTP プロトコルです。\nNode ではこれらは別のモジュールとして実装されています。\n\n</p>\n",
"classes": [
{
"textRaw": "Class: https.Server",
"type": "class",
"name": "https.Server",
"desc": "<!--\nThis class is a subclass of `tls.Server` and emits events same as\n`http.Server`. See `http.Server` for more information.\n-->\n\n<p>このクラスは <code>tls.Server</code> のサブクラスで、<code>http.Server</code> と同様のイベントを生成します。\nより詳しくは <code>http.Server</code> を参照してください。\n\n</p>\n",
"methods": [
{
"textRaw": "server.setTimeout(msecs, callback)",
"type": "method",
"name": "setTimeout",
"desc": "<!--\nSee [http.Server#setTimeout()][].\n-->\n\n<p>[http.Server#setTimeout()][] を参照してください。\n\n</p>\n",
"signatures": [
{
"params": [
{
"name": "msecs"
},
{
"name": "callback"
}
]
}
]
},
{
"textRaw": "server.listen(path, [callback])",
"type": "method",
"name": "listen",
"desc": "<!--\nSee [http.listen()][] for details.\n-->\n\n<p>詳細は [http.listen()][] を参照してください。\n\n</p>\n",
"signatures": [
{
"params": [
{
"name": "handle"
},
{
"name": "callback",
"optional": true
}
]
},
{
"params": [
{
"name": "path"
},
{
"name": "callback",
"optional": true
}
]
}
]
},
{
"textRaw": "server.listen(handle, [callback])",
"type": "method",
"name": "listen",
"desc": "<!--\nSee [http.listen()][] for details.\n-->\n\n<p>詳細は [http.listen()][] を参照してください。\n\n</p>\n",
"signatures": [
{
"params": [
{
"name": "handle"
},
{
"name": "callback",
"optional": true
}
]
}
]
},
{
"textRaw": "server.close([callback])",
"type": "method",
"name": "close",
"desc": "<p>See [http.close()][] for details.\n\n</p>\n<p>詳細は [http.close()][] を参照してください。\n\n</p>\n",
"signatures": [
{
"params": [
{
"name": "callback",
"optional": true
}
]
}
]
}
],
"properties": [
{
"textRaw": "server.timeout",
"name": "timeout",
"desc": "<!--\nSee [http.Server#timeout][].\n\n[http.Server#timeout][] を参照してください。\n\n## https.createServer(options, [requestListener])\n\n<!--\nReturns a new HTTPS web server object. The `options` is similar to\n[tls.createServer()][]. The `requestListener` is a function which is\nautomatically added to the `'request'` event.\n-->\n\n<p>新しい HTTPS Web サーバオブジェクトを返します。\n<code>option</code> は [tls.createServer()][] と同じです。\n<code>requestListener</code> は関数で、 <code>'request'</code> イベントに自動的に追加されます。\n\n</p>\n<!--\nExample:\n-->\n\n<p>例:\n\n</p>\n<pre><code>// curl -k https://localhost:8000/\nvar https = require('https');\nvar fs = require('fs');\n\nvar options = {\n key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')\n};\n\nhttps.createServer(options, function (req, res) {\n res.writeHead(200);\n res.end("hello world\\n");\n}).listen(8000);</code></pre>\n<!--\nOr\n-->\n\n<p>または:\n\n</p>\n<pre><code>var https = require('https');\nvar fs = require('fs');\n\nvar options = {\n pfx: fs.readFileSync('server.pfx')\n};\n\nhttps.createServer(options, function (req, res) {\n res.writeHead(200);\n res.end("hello world\\n");\n}).listen(8000);</code></pre>\n"
}
]
},
{
"textRaw": "Class: https.Agent",
"type": "class",
"name": "https.Agent",
"desc": "<!--\nAn Agent object for HTTPS similar to [http.Agent][]. See [https.request()][]\nfor more information.\n-->\n\n<p>HTTPS 用の Agent オブジェクトで,[http.Agent][] と同様です。\n詳細は [https.request()][] を参照してください。\n\n</p>\n"
}
],
"methods": [
{
"textRaw": "https.request(options, callback)",
"type": "method",
"name": "request",
"desc": "<!--\nMakes a request to a secure web server.\n-->\n\n<p>セキュアな Web サーバへのリクエストを作成します。\n\n</p>\n<!--\n`options` can be an object or a string. If `options` is a string, it is\nautomatically parsed with [url.parse()](url.html#url.parse).\n-->\n\n<p><code>options</code> はオブジェクトまたは文字列です。\n<code>options</code> が文字列なら、それは自動的に <a href=\"url.html#url.parse\">url.parse()</a>\nによって解析されます。\n\n</p>\n<!--\nAll options from [http.request()][] are valid.\n-->\n\n<p>[http.request()][] の全てと同様のオプションが指定できます。\n\n</p>\n<!--\nExample:\n-->\n\n<p>例:\n\n</p>\n<pre><code>var https = require('https');\n\nvar options = {\n hostname: 'encrypted.google.com',\n port: 443,\n path: '/',\n method: 'GET'\n};\n\nvar req = https.request(options, function(res) {\n console.log("statusCode: ", res.statusCode);\n console.log("headers: ", res.headers);\n\n res.on('data', function(d) {\n process.stdout.write(d);\n });\n});\nreq.end();\n\nreq.on('error', function(e) {\n console.error(e);\n});</code></pre>\n<!--\nThe options argument has the following options\n-->\n\n<p><code>options</code> 引数は以下のオプションを持ちます。\n\n</p>\n<!--\n- `host`: A domain name or IP address of the server to issue the request to.\n Defaults to `'localhost'`.\n- `hostname`: To support `url.parse()` `hostname` is preferred over `host`\n- `port`: Port of remote server. Defaults to 443.\n- `method`: A string specifying the HTTP request method. Defaults to `'GET'`.\n- `path`: Request path. Defaults to `'/'`. Should include query string if any.\n E.G. `'/index.html?page=12'`\n- `headers`: An object containing request headers.\n- `auth`: Basic authentication i.e. `'user:password'` to compute an\n Authorization header.\n- `agent`: Controls [Agent][] behavior. When an Agent is used request will\n default to `Connection: keep-alive`. Possible values:\n - `undefined` (default): use [globalAgent][] for this host and port.\n - `Agent` object: explicitly use the passed in `Agent`.\n - `false`: opts out of connection pooling with an Agent, defaults request to\n `Connection: close`.\n-->\n\n<ul>\n<li><code>host</code>: リクエストを発行するサーバのドメイン名または IP アドレス。</li>\n<li><code>hostname</code>: <code>url.parse()</code> で扱える文字列をサポートします。\n<code>hostname</code> は <code>host</code> を上書きします。</li>\n<li><code>port</code>: リモートサーバのポート。デフォルトは 443 です。</li>\n<li><code>method</code>: HTTPS リクエストのメソッドの文字列。デフォルトは <code>'GET'</code> です。</li>\n<li><code>path</code>: リクエストのパス。デフォルトは <code>'/'</code> です。\n必要なら問い合わせ文字列を含めるべきです.\n例 <code>'/index.html?page=12'</code></li>\n<li><code>headers</code>: リクエストヘッダを含むオブジェクト。</li>\n<li><code>auth</code>: べーしく認証すなわち Authorization ヘッダのための <code>'user:password'</code>。</li>\n<li><code>agent</code>: [Agent][] の振る舞いを制御します。\nエージェントが使われる場合、<code>Connection:keep-alive</code> がデフォルトになります。\n可能な値は:<ul>\n<li><code>undefined</code> (デフォルト): ホストとポートで [globalAgent][] を使用します。</li>\n<li><code>Agent</code> オブジェクト: 明示的に渡された <code>Agent</code> を使用します。</li>\n<li><code>false</code>: Agent によるコネクションプーリングを使用しません。\n<code>Connection:close</code> の場合のデフォルトです。</li>\n</ul>\n</li>\n</ul>\n<!--\nThe following options from [tls.connect()][] can also be specified. However, a\n[globalAgent][] silently ignores these.\n-->\n\n<p>以下の [tls.connect()][] 由来のオプションを指定することもできますが、\nグローバル [globalAgent][] はこれらを無視します。\n\n</p>\n<!--\n- `pfx`: Certificate, Private key and CA certificates to use for SSL. Default `null`.\n- `key`: Private key to use for SSL. Default `null`.\n- `passphrase`: A string of passphrase for the private key or pfx. Default `null`.\n- `cert`: Public x509 certificate to use. Default `null`.\n- `ca`: An authority certificate or array of authority certificates to check\n the remote host against.\n- `ciphers`: A string describing the ciphers to use or exclude. Consult\n <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT> for\n details on the format.\n- `rejectUnauthorized`: If `true`, the server certificate is verified against\n the list of supplied CAs. An `'error'` event is emitted if verification\n fails. Verification happens at the connection level, *before* the HTTP\n request is sent. Default `true`.\n- `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force\n SSL version 3. The possible values depend on your installation of\n OpenSSL and are defined in the constant [SSL_METHODS][].\n-->\n\n<ul>\n<li><code>pfx</code>: SSL で使用する証明書、秘密鍵、認証局の証明書。\n デフォルトは <code>null</code> です。</li>\n<li><code>key</code>: SSL で使用する秘密鍵。デフォルトは <code>null</code> です。</li>\n<li><code>passphrase</code>: 秘密鍵または pfx のパスフレーズを表す文字列。\n デフォルトは <code>null</code> です。</li>\n<li><code>cert</code>: x509公開証明書。デフォルトは <code>null</code> です。</li>\n<li><code>ca</code>: リモートホストをチェックする信頼できる認証局または認証局の配列。</li>\n<li><code>ciphers</code>: 使用または除外する暗号を記述した文字列。\n詳細は <a href=\"http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT\">http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT</a>\nを参照してください。</li>\n<li><code>rejectUnauthorized</code>: <code>true</code> の場合、サーバ証明書は提供された認証局の\nリストによって検証されます。\n認証されなかった場合は <code>'error'</code> イベントが生成されます。\n認証は HTTP リクエストが送信される <em>前</em> にコネクションレベルで行われます。\nデフォルトは <code>true</code> です。</li>\n<li><code>secureProtocol</code>: 使用する SSL メソッド、たとえば <code>SSLv3_method</code> は\nSSL version 3 の使用を強制します。可能な値は使用する OpenSSL によって\n定義される [SSL_METHODS][] 定数に依存します。</li>\n</ul>\n<!--\nIn order to specify these options, use a custom `Agent`.\n-->\n\n<p>これらのオプションを指定するには、カスタムエージェントを使用します。\n\n</p>\n<!--\nExample:\n-->\n\n<p>例:\n\n</p>\n<pre><code>var options = {\n hostname: 'encrypted.google.com',\n port: 443,\n path: '/',\n method: 'GET',\n key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')\n};\noptions.agent = new https.Agent(options);\n\nvar req = https.request(options, function(res) {\n ...\n}</code></pre>\n<!--\nOr does not use an `Agent`.\n-->\n\n<p>あるいは、エージェントを使用しません。\n\n</p>\n<!--\nExample:\n-->\n\n<p>例:\n\n</p>\n<pre><code>var options = {\n hostname: 'encrypted.google.com',\n port: 443,\n path: '/',\n method: 'GET',\n key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),\n agent: false\n};\n\nvar req = https.request(options, function(res) {\n ...\n}</code></pre>\n",
"signatures": [
{
"params": [
{
"name": "options"
},
{
"name": "callback"
}
]
}
]
},
{
"textRaw": "https.get(options, callback)",
"type": "method",
"name": "get",
"desc": "<!--\nLike `http.get()` but for HTTPS.\n-->\n\n<p><code>http.get()</code> と同様ですが HTTPS です。\n\n</p>\n<!--\n`options` can be an object or a string. If `options` is a string, it is\nautomatically parsed with [url.parse()](url.html#url.parse).\n-->\n\n<p><code>options</code> はオブジェクトまたは文字列です。\n<code>options</code> が文字列なら、それは自動的に <a href=\"url.html#url.parse\">url.parse()</a>\nによって解析されます。\n\n</p>\n<!--\nExample:\n-->\n\n<p>例:\n\n</p>\n<pre><code>var https = require('https');\n\nhttps.get('https://encrypted.google.com/', function(res) {\n console.log("statusCode: ", res.statusCode);\n console.log("headers: ", res.headers);\n\n res.on('data', function(d) {\n process.stdout.write(d);\n });\n\n}).on('error', function(e) {\n console.error(e);\n});</code></pre>\n",
"signatures": [
{
"params": [
{
"name": "options"
},
{
"name": "callback"
}
]
}
]
}
],
"properties": [
{
"textRaw": "https.globalAgent",
"name": "globalAgent",
"desc": "<!--\nGlobal instance of [https.Agent][] for all HTTPS client requests.\n-->\n\n<p>全ての HTTPS クライアントリクエストで使用される、デフォルトの\n[https.Agent][] のインスタンスです。\n\n</p>\n"
}
],
"type": "module",
"displayName": "HTTPS"
}
]
}