开发者

flex httpservice POST headers/XML payload formation

I am trying to use the Quickbase API (see reference below) with a POST. I am having trouble forming it; specifically, I am clueless as to how to format the header (headers=""). I think the XML Payload is correct, but who knows. Thanks for your help!

Quickbase API reference:

Example XML Request

POST /db/6c5xatxy HTTP/1.0

Content-Type: application/xml

Content-Length: 88

QUICKBASE-ACTION: API_GetRecordInfo

<qdbapi>

<rid>4</rid>

<ticket>1_6c6482m9_j36_c7mdvh9cmmtn9c8qtr5qchvw33v</ticket>

</qdbapi>

My code:

<fx:Declarations>
  <s:HTTPService id="serviceQBPost" method="POST" 
                 url="https://www.quickbase.com/db/beu45unrw" 
             headers="Content-Type: application/xml Content-Length: 88 QUICKBASEACTION:API_GetRecordInfo"
         result="serviceQBPost_resultHandler(event)"
         fault="serviceQBPost_faultHandler(event)">

             <s:request xmlns="">
       <qdbapi>
         <rid>4</rid>
                 <ticket>1_6c6482m9_j36_c7mdvh9cmmtn9c8qtr5qchvw33v</ticket>
       </qdbapi>
     </s:request>


  </s:HTTPService>
 </fx:Declarat开发者_如何学Goions>


The easier is going to be to form your GET requests in a normal browser, then move that to Flex after it works. try https://www.quickbase.com/db/?act=APIGetRecordInfo&rid=1&username=&password=

I wouldn't worry about formatting the XML. Use the REST-style GET, pass the username+password with each request, and go. It's easier.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜