Posted 29 September 2014 - 06:12 PM
Hi,
I have updated my Server because CC 1.6.4 was published. CC iteself is running as expected except the http api.
My program is a banking system which connects to an MySql database through http api and a php script and you can pay in and pay out money (with a bankenote mod, CC and Buildcraft)
Befor posting this i have checked some possible error sources:
- checked http url by calling the link by hand in the browse
- checked CC config and http api is enabled and whitelist is set to *
- checked a printout of the variable myurl if it contains a valid string
So I really dont know why it is not working anymore.
myurl contains someting like that: http://XYZ.mydomain....ata2=MyPassword
Every time i get the http_failure message Server didn't respond.
Maybe someone can help me.
I have updated my Server because CC 1.6.4 was published. CC iteself is running as expected except the http api.
My program is a banking system which connects to an MySql database through http api and a php script and you can pay in and pay out money (with a bankenote mod, CC and Buildcraft)
Befor posting this i have checked some possible error sources:
- checked http url by calling the link by hand in the browse
- checked CC config and http api is enabled and whitelist is set to *
- checked a printout of the variable myurl if it contains a valid string
So I really dont know why it is not working anymore.
myurl contains someting like that: http://XYZ.mydomain....ata2=MyPassword
http.request(myurl)
local requesting = true
while requesting do
local event, url, sourceText = os.pullEvent()
if event == "http_success" then
respondedText = sourceText.readAll()
print ("Antwort: "..respondedText)
requesting = false
elseif event == "http_failure" then
respondedText = ("Server didn't respond.")
print ("Antwort: "..respondedText)
requesting = false
end
end
Every time i get the http_failure message Server didn't respond.
Maybe someone can help me.