Jump to content

callRemote


Recommended Posts

Hello.

I'm trying to get data from .json page

local loadCountries = function ( ) 
    callRemote ( "http://country.io/names.json", loadCountriesCallback ); 
end 

But the problem is that debug says that argument 2 should be string, but i'm not providing host but URL...

WARNING: [jacob]/country/country_s.lua:25: Bad argument @ 'callRemote' [Expected string at argument 2, got nil] 

Link to comment

Getting error 405, which means

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource. 

How can I get this JSON array into my script?

Link to comment
Getting error 405, which means

A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource. 

How can I get this JSON array into my script?

Bro did you create the call back function.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...