Haxe php make post request body from streams (from file)


(Дмитрий Маликов) #1

i have memory limit in server
and need to make big post request 50mb or more - it possible with haxe.Http reading data from file and write to http post?

(Дмитрий Маликов) #2

found this

but marked as deprecated

how to upload file by haxe? any example?

(Valentin Lemière) #3 isn’t marked as deprecated, only

The difference in naming is subtle and can easily be missed :wink:

(Дмитрий Маликов) #4

where i can find example for upload file?

(Valentin Lemière) #5

Don’t know of examples, but considering the arguments it should be something like this:

var http = new haxe.Http("url");
var file = "myfile.txt";
var input =;
http.fileTransfer("thePostVarName", file, input, sys.FileSystem.stat(file).size);