class com.akifox.asynchttp.HttpResponse
Available on all platforms
HttpRequest
This class represents an Http Request
NOTE: You don't need to use this class! It is the HttpResponse object that will be passed to an HttpRequest callback
@author Simone Cingano (yupswing) Akifox Studio
@repo akifox-asynchttp repository
@licence MIT Licence
Instance Fields
var contentType:String
Response content mime-type
NOTE: Always application/octet-stream
in FLASH
NOTE: Always text/plain
in JAVASCRIPT
var filename:String
The resource filename (default: "unknown")
NOTE: This is a guessed resource filename based on the final retrived url
Example:
URL: http://example.com/download/filename.zip?dl=1
Filename: filename.zip
var request:HttpRequest
The request
NOTE: This gives access to the original request (immutable because already sent)
var urlString:String
Final URL retrived (string format)
DEPRECATED: This is deprecated, use instance.url.toString()
instead
function new(request:HttpRequest, time:Float, url:URL, headers:HttpHeaders, status:Int, content:Bytes, ?error:String):Void
Class instance
NOTE: YOU DON'T NEED TO MAKE AN INSTANCE OF THE RESPONSE, IT IS HANDLED INTERNALLY BY THE LIBRARY
The instance is anyway allowed for third party uses of the library * * @param request original request
time | the response time |
url | the final url retrived (could be different from the requested URL because of redirects) |
headers | the response headers |
status | the response status (0 if error otherwise HTTP standard response code) |
content | the response content |
error | the internal error message (optional) |