Why there is only support string in http addParameter?

how to add parmamer as Int or Float?

  public function addParameter(name:String, value:String) {

    params.push({name: name, value: value});

    #if hx3compat

    return this;



You should convert them to a string:

var i = 7;
addParameter("i", '$i');

See String Interpolation - Haxe - The Cross-platform Toolkit for more information on using string interpolation.

I know how to convert ,but when I send “-100” to other’s http server, it’s fails.

why only support string instead of dynamic? include float or int?

Because they need to be strings so they can be included in the http request and because float and ints can be represented as strings.

What does “it fails” mean exactly, the code crash, you get an error from the server?
Are you sure the server expects an int for that parameter?