| Blockland Forums > Help |
| RTB Bug: HTTPObject |
| (1/1) |
| Jeep:
When I try to do an HTTPObject function in the console, I get the following error: Add-Ons/System_ReturntoBlockland/support/networking.cs (205) : Unknown Command onConnected Add-Ons/System_ReturntoBlockland/support/networking.cs (319) : Unknown Command onDisonnected --- Code: ---function getWebPage(%host, %port, %file) // For example, if we wanted to get the page "example.com:80/file.ext", then we would use getWebPage("example.com", 80, "/file.ext") { new HTTPObject(MyHTTPObject).get(%host @ ":" @ %port, %file); // Creating the HTTPObject and sending a request to example.com:80/file.ext } // Now we need to process the response // Unlike TCPObjects, HTTPObjects do not return any headers function MyHTTPObject::onLine(%this, %line) { %page = %page NL %line; // For each new line we add the data onto a single variable if(%line $= "END") // You can have a line on the page, such as 'END' that tells the client to do something, in this case, run a function with the gathered data { doStuffWith(%page); %this.disconnect(); %this.delete(); } } --- End code --- The code works. It seems that RTB called a function and never parented it. Unless anyone else can see an issue here? |
| Navigation |
| Message Index |