Changes

Jump to navigation Jump to search
555 bytes added ,  02:34, 2 February 2013
</body>
</html>
</pre>
 
The response content type can also be overwritten in order to retrieve HTML pages as plain string (using {{Code|text/plain}} or in its binary representation (using {{Code|application/octet-stream}}). The result can then be further processed:
 
'''Query:'''
<pre class="brush:xquery">
let $binary := http:send-request(
<http:request method='get'
override-media-type='application/octet-stream'
href='http://www.google.com'/>
)[2]
return try {
html:parse($binary)
} catch * {
'Conversion to XML failed: ' || $err:description
}
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu