[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ftpapi] Procedure to use for POST data



Hi,

I'm very new to HTTPAPI so need a little help here, sorry might be asking basic/stupid questions.

I need to post data as named value pair and data is embedded in URL itself, example below. I was planning to use HTTPAPI command but I believe that won't return me error message back in program. So other option is to call HTTPCMDR4 program with required parms and it will return me error code and message back in my calling program. 

Not sure if i should be calling this program or use any other procedure e.g. http_url_post_raw2. But with this not sure how to trap the error message if connection/POST is not successful.

https://xyz.com/048216022518/RTI_TRAX_Q?Action="">MessageBody=Loc:6030,Type=FRZ,SKN:423465768675,Qty:1000


In addition, i need to send data in JSON format so i used Scott's YAJL utility and tried to generate data as it's shown in Scott's example. But when i check the http log it shows junk characters, below is snippet from http log file. In debug, it shows junk too but i believe that might be due to EBCDIC vs 1208. In debug i pulled HEX equivalent of data which was showing in program variable and then converted to ASCII format. It showed correctly but not sure why it's transmitting as junk. Below message was posted on remote system with just "-" and rest of the data was ignored/not transmitted. Please help.


do_oper(POST): entered                                                                                                            

There are 0 cookies in the cache                                                                                                  

POST /048216022518/RTI_TRAX_Q?Action=""      <?Ä/ÈÑ?>                 ë?ÍÊÄÁ    ï(ë        éÍ/>ÈÑÈ`      '

Host: sqs.us-east-1.amazonaws.com                                                                                                 

User-Agent: http-api/1.32                                                                          



Thanks,

Pargat                               

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi