|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Can;t connect to web service from Windev |
| Iniciado por guest, 24,ago. 2018 03:07 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 24,agosto 2018 - 03:07 |
Hi,
I've written a rest web service in windev 22 and have it installed and working on a clients server (server A). I've now installed it on second server (server and am having some issues calling Server B it from my windev 22 desktop app.
When I do make a call I get "No server response. Check whether a HTPP server is present on the target server".
Oddly, I can successfully call the web service on Server B from webdev's browser based test tool and from browser code of a webdev AWP page, but NOT from the server code of same webdev page.
I am stumped. Here is code. Any ideas?
If any ones to try hitting below from Windev desktop feel free. That might at least rule out network related issues.
Thanks!
sURL is string sURL="https://rds.tourcube.net/tourcube/ping"
sHTTPRequest is httpRequest sHTTPRequest..Header["tc-api-key"] = "MTSTEST" sHTTPRequest..URL=sURL sHTTPRequest..Method=httpGet cMyResponse is httpResponse = HTTPSend(sHTTPRequest) IF ErrorOccurred THEN Error(ErrorInfo(errFullDetails)) ELSE Info(cMyResponse..Content) END |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,agosto 2018 - 03:18 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,agosto 2018 - 03:25 |
That’s intentional.
There are headers required |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,agosto 2018 - 08:27 |
It looks like for some reason the server does not like the request as it's being sent by
sURL is string sURL="https://rds.tourcube.net/tourcube/ping" sHTTPRequest is httpRequest sHTTPRequest..Header["tc-api-key"] = "MTSTEST" sHTTPRequest..URL=sURL sHTTPRequest..Method=httpGet cMyResponse is httpResponse = HTTPSend(sHTTPRequest)
IF ErrorOccurred THEN Error(ErrorInfo) ELSE Info(cMyResponse..Content) END
b./c when I sent in the following manner it works
HTTPRequest("https://rds.tourcube.net/tourcube/ping","","tc-api-key: MTSTEST","","","","") ResCode is string = HTTPGetResult() Info(ResCode)
Does anyone have any ideas? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,agosto 2018 - 18:25 |
The plot thickens..
I trapped my requests in Ngrok
This request from Fiddler works
GET / HTTP/1.1 tc-api-key: MTSTEST User-Agent: Fiddler Host: https://rds.tourcube.net/tourcube/ping X-Forwarded-For: 97.115.112.236
but this one from Windev does not
GET / HTTP/1.1 Host: e0da3aa0.ngrok.io User-Agent: Tourcube Accept: */* Connection: close tc-api-key: MTSTEST X-Forwarded-For: 97.115.112.236
maybe something about "Accept" and "Connection" that Server B does not like. Oddly my HTPP Response Headers in IIS are same on both servers. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,agosto 2018 - 20:33 |
The second server was kind of old and did not support TLS 1.2
when I added sHTTPRequest..VersionSSL=ProtocolTLS1 it fixed issue.
Now to get that server upgraded |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|