18 lines
382 B
Haxe
18 lines
382 B
Haxe
package kernel.http;
|
|
|
|
using lua.Table;
|
|
|
|
class HTTPResponse {
|
|
|
|
public final statusCode:StatusCode;
|
|
public final headers:Map<String,String>;
|
|
public final body:String;
|
|
|
|
@:allow(kernel.http)
|
|
private function new(handle: cc.HTTP.HTTPResponse) {
|
|
this.statusCode = handle.getResponseCode();
|
|
this.headers = handle.getResponseHeaders().toMap();
|
|
this.body = handle.readAll();
|
|
}
|
|
}
|