webd:get

Purpose

Represents the HTTP GET method.

Note:

The response must contain the Content-Type header, otherwise it won't be processed by MCS.

Contains

Attributes

Attribute Description Type Default Options Use
followRedirects Whether or not to follow any redirects xs:boolean none    optional 
id Identifies the instance of the connector. Can be used in conjunction with xPath expressions to obtain the headers, parameters and cookies returned in the response to the request. xs:string none    optional 
ignoreErroredContent Whether or not to ignore any error codes xs:boolean none    optional 
timeout The sent to the server and back timeout to apply to HTTP/HTTPS requests in seconds. Overrides any default timeout settings in the mcs-config.xml file. xs:integer none    optional 
url The fully specified URL of the web server including protocol and ports. xs:anyURI none    required 
version The version of the HTTP protocol to use when making the request. If not specified then HTTP 1.1 is assumed. xs:string 1.1  1.0, 1.1  optional 

Examples

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:pipeline="http://www.volantis.com/xmlns/marlin-pipeline"
  xmlns:webd="http://www.volantis.com/xmlns/marlin-web-driver">
  <head>
    <title>DCI elements</title>
  </head>
  <body>
    <div>
      <pipeline:transform href="test.xsl">
        <webd:get url="http://weather.yahooapis.com/forecastrss">
          <webd:parameters>
            <webd:parameter name="p" value="USWA0395"/>
            <webd:parameter name="u" value="c"/>
          </webd:parameters>
        </webd:get>
      </pipeline:transform>
    </div>
  </body>
</html>

The test.xsl transform must have the following form.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"
  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
  <xsl:output method="xml"/>
  <xsl:template match="/">
    <div xmlns="http://www.w3.org/2002/06/xhtml2">
      <h3>
        <xsl:value-of select="/rss/channel/item/title"/>
      </h3>
      <p>Current Conditions: <xsl:value-of select="/rss/channel/item/yweather:condition/@text"/>,
        <xsl:value-of select="/rss/channel/item/yweather:condition/@temp"/>
        <xsl:value-of select="/rss/channel/yweather:units/@temperature"/>.</p>
    </div>
  </xsl:template>
</xsl:stylesheet>

Related topics