[node] Add http[s] request/get variants for 10.9.0 (#28193)

This commit is contained in:
Gerhard Stöbich
2018-08-23 19:41:25 +02:00
committed by Andy
parent 1d4d163c93
commit 374598de67
2 changed files with 46 additions and 6 deletions

View File

@@ -1708,7 +1708,25 @@ namespace http_tests {
}
{
http.get('http://www.example.com/xyz');
http.request('http://www.example.com/xyz');
http.get('http://www.example.com/xyz', (res: http.IncomingMessage): void => {});
http.request('http://www.example.com/xyz', (res: http.IncomingMessage): void => {});
http.get(new url.URL('http://www.example.com/xyz'));
http.request(new url.URL('http://www.example.com/xyz'));
http.get(new url.URL('http://www.example.com/xyz'), (res: http.IncomingMessage): void => {});
http.request(new url.URL('http://www.example.com/xyz'), (res: http.IncomingMessage): void => {});
const opts: http.RequestOptions = {
path: '"/some/path'
};
http.get(new url.URL('http://www.example.com'), opts);
http.request(new url.URL('http://www.example.com'), opts);
http.get(new url.URL('http://www.example.com/xyz'), opts, (res: http.IncomingMessage): void => {});
http.request(new url.URL('http://www.example.com/xyz'), opts, (res: http.IncomingMessage): void => {});
}
{
@@ -1770,8 +1788,26 @@ namespace https_tests {
agent: undefined
});
https.get('http://www.example.com/xyz');
https.request('http://www.example.com/xyz');
https.get('http://www.example.com/xyz', (res: http.IncomingMessage): void => {});
https.request('http://www.example.com/xyz', (res: http.IncomingMessage): void => {});
https.get(new url.URL('http://www.example.com/xyz'));
https.request(new url.URL('http://www.example.com/xyz'));
https.get(new url.URL('http://www.example.com/xyz'), (res: http.IncomingMessage): void => {});
https.request(new url.URL('http://www.example.com/xyz'), (res: http.IncomingMessage): void => {});
const opts: https.RequestOptions = {
path: '/some/path'
};
https.get(new url.URL('http://www.example.com'), opts);
https.request(new url.URL('http://www.example.com'), opts);
https.get(new url.URL('http://www.example.com/xyz'), opts, (res: http.IncomingMessage): void => {});
https.request(new url.URL('http://www.example.com/xyz'), opts, (res: http.IncomingMessage): void => {});
https.globalAgent.options.ca = [];
{