Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSMutableURLRequestMBS class.
NSMutableURLRequestMBS.addValue(value as string, field as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
value: The value for the header field.
field: The name of the header field. In keeping with the HTTP RFC, HTTP header field names are case-insensitive
This method provides the ability to add values to header fields incrementally. If a value was previously set for the specified field, the supplied value is appended to the existing value using the appropriate field delimiter. In the case of HTTP, this is a comma.
NSMutableURLRequestMBS.Constructor(url as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Default values are used for cache policy (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 seconds).
On success, handle property is not zero.
See also:
NSMutableURLRequestMBS.Constructor(url as string, cachePolicy as Integer, timeoutInterval as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
See also:
NSMutableURLRequestMBS.setAllHTTPHeaderFields(headerFields as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
headerFields: A dictionary with the new header fields. HTTP header fields must be string values; therefore, each object and key in the headerFields dictionary must be a String. If either the key or value for a key-value pair is not a string, the key-value pair is skipped.
Some examples using this method:
NSMutableURLRequestMBS.setAttribution(Attribution as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Defaults to NSURLRequestAttributionDeveloper.
NSMutableURLRequestMBS.setCachePolicy(policy as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
policy: The new cache policy.
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.
These constants are used to specify interaction with the cached responses.
NSURLRequestUseProtocolCachePolicy = 0,
NSURLRequestReloadIgnoringLocalCacheData = 1,
NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4,
NSURLRequestReturnCacheDataElseLoad = 2,
NSURLRequestReturnCacheDataDontLoad = 3,
NSURLRequestReloadRevalidatingCacheData = 5
NSMutableURLRequestMBS.setHTTPBody(data as MemoryBlock)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
data: The new request body for the receiver. This is sent as the message body of the request, as in an HTTP POST request.
NSMutableURLRequestMBS.setHTTPMethod(HTTPMethod as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
HTTPMethod: The new HTTP request method. The default HTTP method is "GET".
Some examples using this method:
NSMutableURLRequestMBS.setHTTPShouldHandleCookies(should as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
handleCookies: True if the receiver should use the default cookie handling for the request, false otherwise. The default is true.
NSMutableURLRequestMBS.setHTTPShouldUsePipelining(shouldUsePipelining as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
True if the receiver should transmit before the previous response is received. False to wait for the previous response before transmitting.
Calling this method with a true value does not guarantee HTTP pipelining behavior. HTTP 1.1 allows the client to send multiple requests to the server without waiting for a response.
Though HTTP 1.1 requires support for pipelining, some servers report themselves as being HTTP 1.1 but do not support pipelining. To maintain compatibility with these servers, requests may have to wait for the previous response before transmitting.
Available on Mac OS X 10.7 or newer.
NSMutableURLRequestMBS.setMainDocumentURL(url as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The new main document URL. Can be nil.
The caller should set the main document URL to an appropriate main document, if known. For example, when loading a web page the URL of the HTML document for the top-level frame would be appropriate. This URL will be used for the "only from same domain as main document" cookie accept policy.
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.
NSMutableURLRequestMBS.setNetworkServiceType(networkServiceType as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
networkServiceType: The service type to associate with the request.
This method is used to provide the network layers with a hint as to the purpose of the request. Most clients should not need to use this method. See NSURLNetworkServiceType* constants.
Available in Mac OS X 10.7 or newer.
NSMutableURLRequestMBS.setTimeoutInterval(seconds as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
seconds: The timeout interval, in seconds. If during a connection attempt the request remains idle for longer than the timeout interval, the request is considered to have timed out. The default timeout interval is 60 seconds.
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.
Some examples using this method:
NSMutableURLRequestMBS.setURL(url as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.
NSMutableURLRequestMBS.setValue(value as string, field as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
value: The new value for the header field. Any existing value for the field is replaced by the new value.
field: The name of the header field to set. In keeping with the HTTP RFC, HTTP header field names are case-insensitive.
The items on this page are in the following plugins: MBS MacBase Plugin.