Can I http POST a file

new topic     » topic index » view thread      » older message » newer message

Hi

I wish to be able to link my program to my drug suppliers ordering system.

This is an extract from the data interface specs

This is quite a simple system to integrate with as it just requires the client system to POST a simple text file to a URL, and a reply text page is given back as a response. The URL used for posting to is the same for all commands.

The URL is; http://(removed for confidentiality)

Note: Although the system uses the HTTP POST command, you are not able to POST the order via a web page FORM, as the layout of the data is not the same as that generated by a FORM. The POST must be done via an application.

The format of the text file needed to be sent is the same for both ordering and delivery data. It is made up of a header section and a details section. The header section is a list of key/value pairs separated by TAB characters, with the header section terminated by a blank line. The details section is specific to the command being performed;

Example header section;

COMMAND<tab>ORDER
AUTH<tab>YES
USER<tab>JC1
DEL<tab>0
PASSWORD<tab>pass
REFERENCE<tab>000185
CUSTORDERREF<tab>001/000186
TEST<tab>TRUE
<blank_line>

Am I able to do this using euphorias http_post. ie can I post the text file, or do I need to put the key value pairs into the data object.

Chris

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu