You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Are you using 1v51 of Espruino? That had some changes that really improved stability. I've also done a few more tweaks that'll appear in 1v52 and that should improve matters fuirther.

    Also are you sure you're connecting to VBat and not 3.3v, as the 3.3v regulator won't supply enough power for the CC3000...

    As far as the request headers, they're pre-parsed in req.headers / res.headers:

    >require("http").createServer(function (req, res) {
    :  console.log(req.headers);   
    :  res.writeHead(200, {'Content-Type': 'text/plain'});
    :  res.end();
     "User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36",


    >require("http").get("­.uk/time.php", function(res) {
    :  console.log(res.headers);   
    {"Date":"Thu, 20 Feb 2014 16:25:35 GMT",
     "Server":"Apache/2.2.14 (Ubuntu)",

    The only thing you can't do currently is easily get the 'body' of the HTTP server request.


Avatar for Gordon @Gordon started