Socket set header

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 27: Line 27:
  
  
For mroe information and examples of each type of header, please see [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43|14 Header Field Definitions]
+
For more information and examples of each type of header, please see [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43|14 Header Field Definitions]
  
  

Revision as of 15:53, 28 March 2016

This command is a Socket Command. The socket set header command sets a header for the next socket navigate command.

This command words within the socket container with the socket navigate command.

The set header command comes with the following headers:

Accept Specifies which Internet media types are acceptable for the response and to assign preferences to them.

Accept-Charset Specifies which character encodings (confusingly called "charsets") are acceptable for the response and to assign preferences to them.

Accept-Encoding Specifies which data format tranformations, confusingly called content (en)codings, such as compression mechanisms, are acceptable for the response and to assign preferences to them.

Accept-Language Specifies which natural languages are acceptable for the response and to assign preferences to them.

Authorization Consists of credentials containing the authentication information of the client for the realm of the resource being requested

Referer Used by a client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained.

User-Agent Contains information about the user agent (client) originating the request


For more information and examples of each type of header, please see Header Field Definitions


Example

The socket set header command is placed before the socket navigate command.

The example below sets the header User Agent to
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
plugin command("SocketCommands.dll", "socket container") {
    plugin command("SocketCommands.dll", "socket set header", "User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36")
    plugin command("SocketCommands.dll", "socket navigate", "GET", "http://allrecipes.com/")
}

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox