11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1-86 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

Return<br />

Code Status<br />

1 Invalid request handle.<br />

2 Invalid parameter.<br />

3 Bad content type.<br />

addRequestParameter Return Codes (continued)<br />

Note: For a GET request, content_handling is ignored.<br />

For a POST request with default content type, the default for content_handling is<br />

“Content-Type:text/plain” if content_handling is not specified. For a POST request<br />

with “Multipart/*” content-type, content_handling is a dynamic array containing<br />

Content-* strings separated by field marks (@FM). They will be included in the<br />

multipart message before the data contained in parameter_value is sent. An example<br />

of content_handling:<br />

Content-Type: application/XML @FM<br />

Content-Dispostion: attachment; file=”C:\drive\test.dat” @FM<br />

Content-Length: 1923<br />

Specifically, for a POST request with content type “multipart/form-data”, a<br />

“Content-Dispostion: form-data” header will be created (or, in the case of Content-<br />

Dispostion already in content_handling, “form-data” will be added to it).<br />

For both a GET and a POST request with either no content type specified or specified<br />

as “application/x-www-form-urlencoded”, as described in createRequest(), URL<br />

encoding is performed on data in parameter_value automatically. Basically, any<br />

character other than alpha-numeric is considered “unsafe” and will be replaced by<br />

%HH where HH is the ASCII value of the character in question. For example, ‘#’ is<br />

replaced by %23, and ‘/’ is replaced by %2F, etc.. One exception is that by<br />

convention, spaces (‘ ‘) are converted into ‘+’.<br />

For a POST method with other MIME-type specified, no encoding is done on data<br />

contained in parameter_value.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!