Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSURLRequestMBS class.

NSURLRequestMBS.attribution as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 21.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the NSURLRequestAttribution associated with this request.

This will return NSURLRequestAttributionDeveloper for requests that have not explicitly set an attribution.
(Read only property)

NSURLRequestMBS.cachePolicy as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the cache policy of the request.
Example
dim r as NSURLRequestMBS

r=new NSURLRequestMBS("http://www.apple.com",0,5.0)

MsgBox str(r.cachePolicy)

Value is one of the constants in this class.
(Read only property)

NSURLRequestMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The reference to the internal used NSURLRequest object.

(Read and Write property)

NSURLRequestMBS.HTTPBody as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the body of the request.

This is the data sent in a POST request.
(Read only property)

NSURLRequestMBS.HTTPMethod as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the HTTP method assiciated with the receiver.
Example
dim m as new NSMutableURLRequestMBS("http://test.test")
m.setHTTPMethod "PUT"
MsgBox m.HTTPMethod

(Read only property)

NSURLRequestMBS.HTTPShouldHandleCookies as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a flag indicating whether this request should use standard cookie handling (sending of cookies with the request and storing any cookies returned in the response.

(Read only property)

NSURLRequestMBS.HTTPShouldUsePipelining as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Reports whether the receiver is not expected to wait for the previous response before transmitting.

Returns true if the receiver should transmit before the previous response is received. False if the receiver should wait for the previous response before transmitting.

Available in Mac OS X 10.7 or newer.
(Read only property)

NSURLRequestMBS.isHTTPRequest as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this is an HTTP request.

If true, the allHTTPHeaderFields, HTTPShouldHandleCookies, HTTPMethod and HTTPBody methods do work.
(Read only property)

NSURLRequestMBS.mainDocumentURL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The main document URL associated with this load.
Example
dim m as new NSMutableURLRequestMBS("http://test.test/test.jpg")
m.setMainDocumentURL "http://test.test/"
MsgBox m.mainDocumentURL

This URL is used for the cookie "same domain as main document" policy. There may also be other future uses.

NOTE: In the current implementation, this value is unused by the webkit framework. A fully functional version of this method will be available in the future.
(Read only property)

NSURLRequestMBS.networkServiceType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the service type associated with this request.

This will return NSURLNetworkServiceTypeDefault for requests that have not explicitly set a networkServiceType (using the setNetworkServiceType method). See NSURLNetworkServiceType* constants.

Available in Mac OS X 10.7 or newer.
(Read only property)

NSURLRequestMBS.timeoutInterval as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the timeout interval of the request.
Example
dim r as NSURLRequestMBS

r=new NSURLRequestMBS("http://www.apple.com",0,5.0)

MsgBox str(r.timeoutInterval)

The timeout interval specifies the limit on the idle interval alloted to a request in the process of loading. The "idle interval" is defined as the period of time that has passed since the last instance of load activity occurred for a request that is in the process of loading. Hence, when an instance of load activity occurs (e.g. bytes are received from the network for a request), the idle interval for a request is reset to 0. If the idle interval ever becomes greater than or equal to the timeout interval, the request is considered to have timed out. This timeout interval is measured in seconds.
(Read only property)

Some examples using this property:

NSURLRequestMBS.URL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the URL of the request.
Example
dim r as NSURLRequestMBS

r=new NSURLRequestMBS("http://www.apple.com")

MsgBox r.URL

(Read only property)

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...