PDA

View Full Version : httpservice POST header formation/XML payload


siguva
11-22-2009, 07:25 PM
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 QUICKBASE-ACTION: 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>