Skip to content

Commit

Permalink
Pass content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Sep 17, 2019
1 parent 073a6ef commit 8937b39
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -11,6 +11,7 @@ import { IRequestService, asJson, asText } from 'vs/platform/request/common/requ
import { URI } from 'vs/base/common/uri';
import { joinPath } from 'vs/base/common/resources';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IStringDictionary } from 'vs/base/common/collections';

export class UserDataSyncStoreService extends Disposable implements IUserDataSyncStoreService {

Expand Down Expand Up @@ -51,7 +52,8 @@ export class UserDataSyncStoreService extends Disposable implements IUserDataSyn
}
const url = joinPath(URI.parse(this.productService.settingsSyncStoreUrl!), key).toString();
const data = JSON.stringify({ content, ref });
const context = await this.requestService.request({ type: 'POST', url, data }, CancellationToken.None);
const headers: IStringDictionary<string> = { 'Content-Type': 'application/json' };
const context = await this.requestService.request({ type: 'POST', url, data, headers }, CancellationToken.None);
const newRef = await asText(context);
if (!newRef) {
throw new Error('Server did not return the ref');
Expand Down

0 comments on commit 8937b39

Please sign in to comment.