You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This class can be used to handle Http requests consistently across platforms. There are two intended usages:
call haxe.Http.requestUrl(url) and receive the result as a String (not available on flash)
create a new haxe.Http(url), register your callbacks for onData, onError and onStatus, then call request().
Is this a deliberate choice? Why wouldn't Http.request() accept a string or enum choosing any of the valid HTTP request methods, instead of just a bool for post?
The text was updated successfully, but these errors were encountered:
Slightly related: it is weird that requestUrl is documented on HttpBase, which doesn't seem to declare the method. I thought I would be able to use requestUrl on all platforms by using the haxe.Http typedef, but it doesn't work for node JS:
src/hiss/wrappers/HHttp.hx:35: characters 21-31 : Class<haxe.http.HttpNodeJs> has no field requestUrl`
I've updated HttpBase docs.
As for request methods I guess it's the legacy of times when other request methods were almost never used on the web.
We will implement better HTTP API during our work on a new asys APIs
Teaching myself from the docs, it seems to me that the Haxe standard library only has a unified interface for making GET requests and POST requests.
This is my conclusion based on the HttpBase docs here: https://api.haxe.org/haxe/http/HttpBase.html:
Is this a deliberate choice? Why wouldn't
Http.request()
accept a string or enum choosing any of the valid HTTP request methods, instead of just a bool for post?The text was updated successfully, but these errors were encountered: