Xojo Conferences
XDCApr2018DenverUSA
MBSSep2018MunichEurope

MBS Xojo Network Kit

NSURLResponseMB class:

Class NSURLResponseMB
ComputedProperty MIMEType As text
Sub Set() End
Sub Get() // Returns the MIME type of the receiver. // The MIME type is based on the information provided // from an origin source. However, that value may be changed or // corrected by a protocol implementation if it can be determined // that the origin server or source reported the information // incorrectly or imprecisely. An attempt to guess the MIME type may // be made if the origin source did not report any such information. End
End ComputedProperty
ComputedProperty URL As text
Sub Set() End
Sub Get() // Returns the URL of the receiver. End
End ComputedProperty
ComputedProperty allHeaderFields As Dictionary
Sub Set() End
Sub Get() // Returns a dictionary containing all the HTTP header fields of the receiver. // By examining this header dictionary, clients can see the "raw" header information which was reported to the protocol // implementation by the HTTP server. This may be of use to sophisticated or special-purpose HTTP clients. // Returns a dictionary containing all the HTTP header fields of the receiver. End
End ComputedProperty
ComputedProperty expectedContentLength As Int64
Sub Set() End
Sub Get() // Returns the expected content length of the receiver. // Some protocol implementations report a content length // as part of delivering load metadata, but not all protocols // guarantee the amount of data that will be delivered in actuality. // Hence, this method returns an expected amount. Clients should use // this value as an advisory, and should be prepared to deal with // either more or less data. // Returns the expected content length of the receiver, or -1 if // there is no expectation that can be arrived at regarding expected // content length. End
End ComputedProperty
ComputedProperty statusCode As Integer
Sub Set() End
Sub Get() // Returns the HTTP status code of the receiver. End
End ComputedProperty
ComputedProperty suggestedFilename As text
Sub Set() End
Sub Get() // Returns a suggested filename if the resource were saved to disk. // The method first checks if the server has specified a filename using the // content disposition header. If no valid filename is specified using that mechanism, // this method checks the last path component of the URL. If no valid filename can be // obtained using the last path component, this method uses the URL's host as the filename. // If the URL's host can't be converted to a valid filename, the filename "unknown" is used. // In mose cases, this method appends the proper file extension based on the MIME type. // This method always returns a valid filename. End
End ComputedProperty
ComputedProperty textEncodingName As text
Sub Set() End
Sub Get() // Returns the name of the text encoding of the receiver. // This name will be the actual string reported by the // origin source during the course of performing a protocol-specific // URL load. Clients can inspect this string and convert it to an // TextEncoding. // Returns the name of the text encoding of the receiver, or nil if no // text encoding was specified. End
End ComputedProperty
Const FoundationLib = Foundation.framework
Protected Sub Constructor() // not allowed End
Sub Constructor(Handle as Integer) // create new response with given handle End
Sub Constructor(URL as text, StatusCode as Integer, HTTPVersion as Text, HeaderFields as Dictionary) // Initializer for NSHTTPURLResponse objects. // url: the URL from which the response was generated. // statusCode: an HTTP status code. // HTTPVersion: The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". // headerFields: A dictionary representing the header keys and values of the server response. // This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. End
Sub Constructor(URL as text, MIMEType as text, expectedContentLength as Integer, textEncodingName as text) // Initialize an NSURLResponse with the provided values. // URL: the URL // MIMETYPE: the MIME content type of the response // expectedContentLength: the expected content length of the associated data // textEncodingName: the name of the text encoding for the associated data, if applicable, else nil End
Sub Destructor() // the Destructor End
Function copy() As NSURLResponseMB // creates a copy of the object End
Shared Function localizedStringForStatusCode(statusCode as Integer) As text // Convenience method which returns a localized string // corresponding to the status code for this response. // the status code to use to produce a localized string. // returns a localized string corresponding to the given status code. End
Note About
Property Handle As Integer
End Class




Links
MBS Xojo PDF Plugins