Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-30-2005, 02:47 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
HTTP Requests and hosts

I noticed several revisions ago that some new request commands were added on the client-end, one of which involves HTTP requests. This is great, but it does not seem to be sending the Host to the server, which can cause problems with some web hosts.

The code I'm using:
HTML Code:
//#CLIENTSIDE
function onCreated()
{
  this.request = requesthttp("delteria.com", 80, "/test.txt");
  setTimer(0.1);
}

function onTimeout()
{
  // Check if the file has finished downloading
  if (this.request.downloadcomplete)
  {
    // The file has finished downloading, output data to console
    for (data: this.request.data)
      echo(data);
  }
  else
  {
    // File hasn't finished downloading yet, wait another 0.1 seconds
    // and check again.
    setTimer(0.1);
  }
}
This returns a 404 error, and if I change /test.txt to /index.html, it returns cPanel's "no website configured" page (Which can be seen here.) rather than http://delteria.com/test.txt. I can work around it by doing requesthttp("delteria.com", 80, "/~delteria/test.txt"); but it would still be nice if this was looked into.

I was also wondering if/when this will be supported serverside; and I noticed a "requestmysql" command as well, but have no clue how to use it. I tried to assume params and output variables/functions, but only got the defaults.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.