Initial from bip32.github.io
This commit is contained in:
33
js/htmlpost.xml
Normal file
33
js/htmlpost.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
|
||||
<meta>
|
||||
<author>brainwallet</author>
|
||||
<description>POST method for YQL</description>
|
||||
<sampleQuery><![CDATA[
|
||||
select * from {table} where url='http://example.com'
|
||||
and postdata="foo=foo&bar=bar" and xpath="//p"]]></sampleQuery>
|
||||
<documentationURL></documentationURL>
|
||||
</meta>
|
||||
<bindings>
|
||||
<select itemPath="" produces="XML">
|
||||
<urls>
|
||||
<url>{url}</url>
|
||||
</urls>
|
||||
<inputs>
|
||||
<key id="url" type="xs:string" required="true" paramType="variable"/>
|
||||
<key id="postdata" type="xs:string" required="true" paramType="variable"/>
|
||||
<key id="xpath" type="xs:string" required="true" paramType="variable"/>
|
||||
</inputs>
|
||||
<execute>
|
||||
<![CDATA[
|
||||
var myRequest = y.rest(url);
|
||||
var data = myRequest.accept('text/html').
|
||||
contentType("application/x-www-form-urlencoded").
|
||||
post(postdata).response;
|
||||
var xdata = y.xpath(data,xpath);
|
||||
response.object = <postresult>{xdata}</postresult>;
|
||||
]]>
|
||||
</execute>
|
||||
</select>
|
||||
</bindings>
|
||||
</table>
|
||||
Reference in New Issue
Block a user