Create Simple http Post Request
869209Jun 15 2011 — edited Jun 16 2011Hi
Ok I need to create fairly simple http post from Database (linux) to another Linux box.
Here is what My whole program structured :
I create Flat files from given table(oracle 10.2.0.3) on periodic basis
Zip and FTP them over the network to another Linux (X86_64) box. THis doesnt have Database Its more of just webserver
Once I push FTP file I need to do HTTP POST telling this webserver that files are being pushed as
url = https://xxx.xx.xx.xx/file/upload
data = file123.zip&[file1||file2||file3]=3
I have done same this in Sql server and it seems its quite straight forward once u know how to to it. How can I accomplish same in Oracle 10g.
This is what preetty much summed my code in sql server :
exec @hr = sp_OACreate 'MSXML2.ServerXMLHttp', @httpRequest OUT
exec @hr = sp_OAMethod @httpRequest, 'open', NULL, 'POST', @sUrl, false
exec @hr = sp_OAMethod @httpRequest, 'setRequestHeader', NULL, 'Content-Type', 'application/x-www-form-urlencoded'
set @requestBody = 'file123.zip&[file1||file2||file3]=3'
exec @hr = sp_OAMethod @httpRequest, 'setOption', NULL, 2, 13056
exec @hr = sp_OAMethod @httpRequest, send, NULL, @requestBody
exec @hr = sp_OAGetProperty @httpRequest, 'status', @status OUT