how to get the data of a http post request?

Friday, 15 November 2013 · 2 messages
E
easy15 Nov 2013 00:55 #

hi,all,

I can't find function in request module to get the request content. such as request:get-data(), any idea?

-- 此致 easy 莫愁前路无知己,天下谁人不识君。
AH
Alexander Holupirek15 Nov 2013 08:33 #

Hello 此致,

Quoted text · easy · 10 lines
On 15.11.2013, at 00:55, easy <lin_xd at 126.com> wrote: > hi,all, > > I can't find function in request module to get the request content. such as request:get-data(), any idea? > -- > 此致 > > easy > > 莫愁前路无知己,天下谁人不识君。

does something like

Query: http:send-request(<http:request method='get' status-only='true'/>, 'http://basex.org')

Result:

<http:response status="200" message="OK">
  <http:header name="Date" value="Mon, 14 Mar 2011 20:55:53 GMT"/>
  <http:header name="Content-Length" value="12671"/>
  <http:header name="Expires" value="Mon, 14 Mar 2011 20:57:23 GMT"/>
  <http:header name="Set-Cookie" value="fe_typo_user=d10c9552f9a784d1a73f8b6ebdf5ce63; path=/"/>
  <http:header name="Connection" value="close"/>
  <http:header name="Content-Type" value="text/html; charset=utf-8"/>
  <http:header name="Server" value="Apache/2.2.16"/>
  <http:header name="X-Powered-By" value="PHP/5.3.5"/>
  <http:header name="Cache-Control" value="max-age=90"/>
  <http:body media-type="text/html; charset=utf-8"/>
</http:response>

work for you?

You may also have a look at

• Fetch Module [1] This XQuery Module provides simple functions to fetch the content of resources identified by URIs.

Thanks, Alex

[1] http://docs.basex.org/wiki/Fetch_Module


⚡Generated with XQuery