I have a server under NekoVM that provides a RESTLike service. I am trying to send a PUT / DELETE request to this server using the following Haxe code:
static public function main() { var req : Http = new Http("http://localhost:2000/add/2/3"); var bytesOutput = new haxe.io.BytesOutput(); req.onData = function (data) { trace(data); trace("onData"); } req.onError = function (err) { trace(err); trace("onError"); } req.onStatus = function(status) { trace(status); trace("onStatus"); trace (bytesOutput); }
The problem is that only the onStatus event shows something:
Main.hx:32: 200 Main.hx:33: onStatus Main.hx:34: { b => { b =>
Can someone explain to me what I'm doing wrong with customRequest ?
source share