mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-26 20:51:38 +00:00
attempt some fix?
This commit is contained in:
parent
a06adeb435
commit
8569a95116
1 changed files with 2 additions and 2 deletions
|
|
@ -50,13 +50,13 @@ class Http {
|
||||||
responses.add(() -> req.callback(b));
|
responses.add(() -> req.callback(b));
|
||||||
req.fulfilled = true;
|
req.fulfilled = true;
|
||||||
};
|
};
|
||||||
hl.Gc.enable(false);
|
|
||||||
hl.Gc.blocking(true); // Wtf is this shit
|
|
||||||
if (req.post) {
|
if (req.post) {
|
||||||
http.setHeader('User-Agent', 'MBHaxe/1.0 ${Util.getPlatform()}');
|
http.setHeader('User-Agent', 'MBHaxe/1.0 ${Util.getPlatform()}');
|
||||||
http.setHeader('Content-Type', "application/json"); // support json data only (for now)
|
http.setHeader('Content-Type', "application/json"); // support json data only (for now)
|
||||||
http.setPostData(req.postData);
|
http.setPostData(req.postData);
|
||||||
}
|
}
|
||||||
|
hl.Gc.enable(false);
|
||||||
|
hl.Gc.blocking(true); // Wtf is this shit
|
||||||
http.request(req.post);
|
http.request(req.post);
|
||||||
hl.Gc.blocking(false);
|
hl.Gc.blocking(false);
|
||||||
hl.Gc.enable(true);
|
hl.Gc.enable(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue