mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
JSON completion contributors
This commit is contained in:
@@ -22,7 +22,7 @@ export interface IXHROptions {
|
||||
agent?: any;
|
||||
strictSSL?: boolean;
|
||||
responseType?: string;
|
||||
followRedirects: number;
|
||||
followRedirects?: number;
|
||||
}
|
||||
|
||||
export interface IXHRResponse {
|
||||
@@ -47,6 +47,9 @@ export function xhr(options: IXHROptions): Promise<IXHRResponse> {
|
||||
const agent = getProxyAgent(options.url, { proxyUrl, strictSSL });
|
||||
options = assign({}, options);
|
||||
options = assign(options, { agent, strictSSL });
|
||||
if (typeof options.followRedirects !== 'number') {
|
||||
options.followRedirects = 5;
|
||||
}
|
||||
|
||||
return request(options).then(result => new Promise<IXHRResponse>((c, e) => {
|
||||
let res = result.res;
|
||||
|
||||
Reference in New Issue
Block a user