FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problems with the Http request
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Problems with the Http request

Posted: Tue Mar 17, 2020 07:43 AM

Hi,

I enter a URL in the browser's address bar https://MySait/xx.php?DNSID=wCx and go to this page. In my program, I make an http request to this page

   ohttp: Open( "GET", "https://MySait/xx.php?DNSID=wCx", 1) 
   ohttp:Send (NIL) 
   .......

and I want to get the HTML text of this page
buf:=ohttp:responseText

However, as a result, I get the HTML text of the main page of the MySait site. It turns out that the HTTP request is not triggered if the URL contains xx.PHP ?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: Problems with the Http request

Posted: Tue Mar 17, 2020 11:08 AM

And if you use as url : https://mysait ( only ) ?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Re: Problems with the Http request

Posted: Tue Mar 17, 2020 11:41 AM

"MySite" is, for example, XX.ORG :D

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Re: Problems with the Http request

Posted: Wed Mar 18, 2020 06:04 AM

I think that the problem with the request is authorization on the site.

ohttp: Open( "GET", URL, 1, login, password)

May need to change the encoding of the login and password ? Or use POST instead of GET ?

Continue the discussion