generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: [HTTP] Check if GetAsync() works

Previous Thread :: Next Thread 
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
19 Aug 2015 07:56 PM
How do I test to see if I am able to GET info from a URL, via HTTP:GetAsync()
WITHOUT THE CONSOLE DISPLAYING AN ERROR INFO!!!!!

I've tried:

local HTTP = game:GetService("HttpService")
local url = "test"
function check()
HTTP:GetAsync(url)
end
success, message = pcall(check)
if success then
print("success")
else
print("An error FAILED: "..message)
end


_____________________-

The pcall works, BUT the console says, Unable to get HTTP Get request, etc.
I DONT WANT IT TO STAY THIS. I want it to check if it can get anything, if not, do the print(). I DONT WANT THE CONSOLE PRINTING ANYTHING.


Any ideas?
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
19 Aug 2015 07:58 PM
There /should/ be a way to disable warning messages, but I doubt there is.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
19 Aug 2015 08:00 PM
That's not an error, it is the response.
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
19 Aug 2015 08:01 PM
I have no idea how to disable error messages, but try putting http:// in front of test XD



It's simple physics
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
19 Aug 2015 09:48 PM
How about is there anyway I can simply "CHECK" if I can get info from a website. Just check, not actually try?
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
19 Aug 2015 09:51 PM
local req = game:GetService("HttpService"):GetAsync("http://google.com",true)
print(req)

If a test server prints something then http works if not then nada :D
while true do the do
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
19 Aug 2015 09:52 PM
No, you can't just 'check'. :
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
19 Aug 2015 09:53 PM
@quinitinity yeah you can :P

while true do the do
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
19 Aug 2015 09:53 PM
pcall it
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
19 Aug 2015 09:53 PM
@Ripepperoni noo why this name?

while true do the do
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
19 Aug 2015 09:54 PM
rip
:(
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
19 Aug 2015 09:54 PM
Tell me, how do you check if a website is valid using HTTPService without it sending any requests. I'm genuinely interested.
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
19 Aug 2015 09:56 PM
@Quintinity,
you say abraka dabra!!
I thought OP wanted to get info from a website , I missed the without the HttpService part ;P

while true do the do
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
19 Aug 2015 10:08 PM
oh without httpserice

lmaooo??????????????????????????????????????????????
?????

It doesn't matter if the console prints anything
nobody really looks at that
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image