Problems with the Http request

Problems with the Http request

Postby Natter » Tue Mar 17, 2020 7: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 ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Problems with the Http request

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Problems with the Http request

Postby Natter » Tue Mar 17, 2020 11:41 am

"MySite" is, for example, XX.ORG :D
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Problems with the Http request

Postby Natter » Wed Mar 18, 2020 6: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 ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests