jinyistudio Well-Known Member Licensed User Longtime User Jun 27, 2016 #1 Hi I always get a message "Cannot POST /" when i running following code job1.PostString(link,""). link --> http://192.168.1.110:8080 Code: Copy Sub run Dim job1 As HttpJob Try job1.Initialize("run",Me) Dim link As String="http://"&Hostip&":"&Hostport job1.PostString(link,"") Catch Log("Exception:"&LastException) End Try End Sub Attachied file 192.168.1.110.txt(html) is send from http://192.168.1.110:8080 when i PostString(,,,) Attachments 192.168.1.110.txt 192.168.1.110.txt 219 bytes · Views: 361
Hi I always get a message "Cannot POST /" when i running following code job1.PostString(link,""). link --> http://192.168.1.110:8080 Code: Copy Sub run Dim job1 As HttpJob Try job1.Initialize("run",Me) Dim link As String="http://"&Hostip&":"&Hostport job1.PostString(link,"") Catch Log("Exception:"&LastException) End Try End Sub Attachied file 192.168.1.110.txt(html) is send from http://192.168.1.110:8080 when i PostString(,,,)
B billzhan Active Member Licensed User Longtime User Jun 27, 2016 #2 What's the exception message? It seems that you post an empty string to the server, what contents do the server (192.168.1.110:8080) expects? Is there any server log available? Upvote 0
What's the exception message? It seems that you post an empty string to the server, what contents do the server (192.168.1.110:8080) expects? Is there any server log available?
jinyistudio Well-Known Member Licensed User Longtime User Jun 27, 2016 #3 "Cannot POST /" isn't a Exception message. It's a message show in B4j log windows when i run job1.Poststring(,,). The link isn't a empty string. Hostip and hostport are my class property. billzhan said: What's the exception message? It seems that you post an empty string to the server, what contents do the server (192.168.1.110:8080) expects? Is there any server log available? Click to expand... Upvote 0
"Cannot POST /" isn't a Exception message. It's a message show in B4j log windows when i run job1.Poststring(,,). The link isn't a empty string. Hostip and hostport are my class property. billzhan said: What's the exception message? It seems that you post an empty string to the server, what contents do the server (192.168.1.110:8080) expects? Is there any server log available? Click to expand...
B billzhan Active Member Licensed User Longtime User Jun 27, 2016 #5 I meant "<post cotent>" is empty. Code: Copy job1.PostString(link,"<post cotent>") Upvote 0
jinyistudio Well-Known Member Licensed User Longtime User Jun 28, 2016 #6 I found following code is OK !! Code: Copy Sub run Dim job1 As HttpJob Try job1.Initialize("run",Me) Dim link As String="http://" & Hostip & ":" & Hostport & "/run" job1.Download(link) Catch Log("Exception:" & LastException) End Try End Sub Upvote 0
I found following code is OK !! Code: Copy Sub run Dim job1 As HttpJob Try job1.Initialize("run",Me) Dim link As String="http://" & Hostip & ":" & Hostport & "/run" job1.Download(link) Catch Log("Exception:" & LastException) End Try End Sub