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

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?

found this haxe.Http - Haxe 4.2.1 API

but marked as deprecated

how to upload file by haxe? any example?

haxe.Http - Haxe 4.2.1 API isn’t marked as deprecated, only haxe.Http - Haxe 4.2.1 API

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

where i can find example for upload file?

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 = sys.io.File.read(file);
http.fileTransfer("thePostVarName", file, input, sys.FileSystem.stat(file).size);
1 Like