K kostefar Active Member Licensed User Longtime User Apr 11, 2018 #1 Dear All, This is a client side question: There´s a host on which I´m using httpjob.download from which the domain is not always resolved to the same IP. That´s completely normal. As far as I can see, there are only two different IP´s that it resolves to. However, one of these has a much better ping time response than the other one, so I was thinking that if I could bind my httpjob requests to this one, I´d get faster communication with the host. This host does not allow me to use the IP address directly neither in a browser nor in a httpjob request, it must go via the hostname. I hope my question is clear. Any ideas? Thanks in advance!
Dear All, This is a client side question: There´s a host on which I´m using httpjob.download from which the domain is not always resolved to the same IP. That´s completely normal. As far as I can see, there are only two different IP´s that it resolves to. However, one of these has a much better ping time response than the other one, so I was thinking that if I could bind my httpjob requests to this one, I´d get faster communication with the host. This host does not allow me to use the IP address directly neither in a browser nor in a httpjob request, it must go via the hostname. I hope my question is clear. Any ideas? Thanks in advance!
Erel B4X founder Staff member Licensed User Longtime User Apr 12, 2018 #2 Two options: 1. If the server doesn't use SSL then you can override the host header: Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://50.17.234.140/headers") j.GetRequest.SetHeader("Host", "httpbin.org") Wait For (j) JobDone (j As HttpJob) Log(j.GetString) j.Release 2. Configure the client computer to resolve the host name to a specific ip address (Windows: https://support.rackspace.com/how-to/modify-your-hosts-file/ ) Last edited: Apr 12, 2018 Upvote 0
Two options: 1. If the server doesn't use SSL then you can override the host header: Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://50.17.234.140/headers") j.GetRequest.SetHeader("Host", "httpbin.org") Wait For (j) JobDone (j As HttpJob) Log(j.GetString) j.Release 2. Configure the client computer to resolve the host name to a specific ip address (Windows: https://support.rackspace.com/how-to/modify-your-hosts-file/ )
K kostefar Active Member Licensed User Longtime User Apr 12, 2018 #3 Erel said: Two options: 1. If the server doesn't use SSL then you can override the host header: Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://50.17.234.140/headers") j.GetRequest.SetHeader("Host", "httpbin.org") Wait For (j) JobDone (j As HttpJob) Log(j.GetString) j.Release 2. Configure the client computer to resolve the host name to a specific ip address (Windows: https://support.rackspace.com/how-to/modify-your-hosts-file/ ) Click to expand... Big thanks! Upvote 0
Erel said: Two options: 1. If the server doesn't use SSL then you can override the host header: Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://50.17.234.140/headers") j.GetRequest.SetHeader("Host", "httpbin.org") Wait For (j) JobDone (j As HttpJob) Log(j.GetString) j.Release 2. Configure the client computer to resolve the host name to a specific ip address (Windows: https://support.rackspace.com/how-to/modify-your-hosts-file/ ) Click to expand... Big thanks!