Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

NSMutableURLRequestMBS.addValue(value as string, field as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Adds an HTTP header to the receiver's HTTP header dictionary.
Example:
dim m as new NSMutableURLRequestMBS("http://test.test")

m.addValue "Hello", "test"
m.addValue "World", "test"

MsgBox m.valueForHTTPHeaderField("test")
Notes:
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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.Constructor(url as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Creates an NSURLRequest with the given URL.
Example:
dim m as new NSMutableURLRequestMBS("http://test.test")

MsgBox m.URL
Notes:
Default values are used for cache policy (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 seconds).
On success, handle property is not zero.

See also:

Feedback, Comments & Corrections

NSMutableURLRequestMBS.Constructor(url as string, cachePolicy as Integer, timeoutInterval as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Creates an NSURLRequest with the given URL.

See also:

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setAllHTTPHeaderFields(headerFields as Dictionary)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Replaces the receiver's header fields with the passed values.
Notes: 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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setCachePolicy(policy as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Sets the cache policy of the receiver.
Notes:
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

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setHTTPBody(data as MemoryBlock)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the request body of the receiver to the specified data.
Notes: data: The new request body for the receiver. This is sent as the message body of the request, as in an HTTP POST request.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setHTTPMethod(HTTPMethod as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the receiver's HTTP request method.
Example:
dim m as new NSMutableURLRequestMBS("http://test.test")
m.setHTTPMethod "PUT"
MsgBox m.HTTPMethod
Notes: HTTPMethod: The new HTTP request method. The default HTTP method is "GET".

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setHTTPShouldHandleCookies(should as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets whether the receiver should use the default cookie handling for the request.
Example:
dim r as NSURLRequestMBS = NSURLRequestMBS.requestWithURL("http://www.apple.de")
Dim m as NSMutableURLRequestMBS = r.mutableCopy
m.setHTTPShouldHandleCookies(false)
HTMLViewer1.LoadRequest m
Notes: handleCookies: True if the receiver should use the default cookie handling for the request, false otherwise. The default is true.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setHTTPShouldUsePipelining(shouldUsePipelining as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets whether the request should not wait for the previous response before transmitting.
Notes:
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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setMainDocumentURL(url as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Sets the main document URL for the receiver.
Example:
dim m as new NSMutableURLRequestMBS("http://test.test/test.jpg")
m.setMainDocumentURL "http://test.test/"
MsgBox m.mainDocumentURL
Notes:
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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setNetworkServiceType(networkServiceType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the NSURLRequestNetworkServiceType to associate with this request.
Notes:
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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setTimeoutInterval(seconds as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Sets the receiver's timeout interval, in seconds.
Notes:
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.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setURL(url as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Sets the URL of the receiver.
Notes:
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.

Feedback, Comments & Corrections

NSMutableURLRequestMBS.setValue(value as string, field as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the specified HTTP header field.
Example:
dim m as new NSMutableURLRequestMBS("http://test.test")
m.setValue("just a test", "test")
MsgBox m.valueForHTTPHeaderField("test")
Notes:
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.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo PDF Plugins