Merge pull request #855 from mongris/master

Fixed crash issue with VSCode debugging
This commit is contained in:
Victor Grishchenko 2017-02-27 16:43:42 +01:00 committed by GitHub
commit 53f245b65c
1 changed files with 6 additions and 1 deletions

View File

@ -179,7 +179,12 @@ function makeRequest(url, data) {
// The global __debug__ object is provided by Visual Studio Code.
if (global.__debug__) {
let request = global.__debug__.require('sync-request');
let response = request('POST', url, {json: data});
let response = request('POST', url, {
body: JSON.stringify(data),
headers: {
"Content-Type": "text/plain;charset=UTF-8"
}
});
statusCode = response.statusCode;
responseText = response.body.toString('utf-8');