mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
💄
This commit is contained in:
@@ -108,7 +108,7 @@ export function download(filePath: string, context: IRequestContext): TPromise<v
|
||||
});
|
||||
}
|
||||
|
||||
export function text(context: IRequestContext): TPromise<string> {
|
||||
export function asText(context: IRequestContext): TPromise<string> {
|
||||
return new Promise((c, e) => {
|
||||
if (!isSuccess(context)) {
|
||||
return e('Server returned ' + context.res.statusCode);
|
||||
@@ -125,7 +125,7 @@ export function text(context: IRequestContext): TPromise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
export function json<T>(context: IRequestContext): TPromise<T> {
|
||||
export function asJson<T>(context: IRequestContext): TPromise<T> {
|
||||
return new Promise((c, e) => {
|
||||
if (!isSuccess(context)) {
|
||||
return e('Server returned ' + context.res.statusCode);
|
||||
|
||||
Reference in New Issue
Block a user