tags:

views:

270

answers:

1

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:Declarations>
A: 

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&amp;rid=1&amp;username=&amp;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.

David Rudder
You are totally right. I thought b/c they didn't list a URL alternative in their documentation that it wouldn't work. This is much easier. Also, it's API_GetRecordInfo instead of APIGetRecordInfo, but I got the point!Thanks for your help, David!
Hunter in SD