AgentGuide Example Code incorrect

I assume the example code just probably hasn’t been updated with the current version of the Agent API but there are several problems where it will not run (although definitely enough to get started!)

One example is the example on page 4:
http.get("http://api.myco.com", {}).sendasync(function(response) { server.log(response.statusCode) server.log(response.body) };

response.statusCode should be response.statuscode and there is no closing parentheses ‘)’ at the end of the sendasync function.

There are similar issues with some of the other examples. I haven’t run all of them yet and am in no hurry but wanted to make everyone aware of the issues until Electric Imp has time to fix them.

Thanks for catching those. We just updated the document.