I hereby claim:
- I am empijei on github.
- I am empijei (https://keybase.io/empijei) on keybase.
- I have a public key ASAza9vw1MZv-HUkY4_48XbnFsfc1QhbbMWjZ0bvYNBxGAo
To claim this, I am signing this object:
// license: public domain - original author: Shimon Doodkin - https://gist.github.com/4706967 | |
// | |
// tinyxhr("http://site.com/ajaxaction",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data) }); | |
// tinyxhr("http://site.com/ajaxaction",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data) },'POST','value1=1&value2=2'); | |
// tinyxhr("http://site.com/ajaxaction.json",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data); console.log(JSON.parse(data)) },'POST',JSON.stringify({value:1}),'application/javascript'); | |
// cb - a callback function like: function (err,data,XMLHttpRequestObject){ if (err) throw err; } | |
// | |
function tinyxhr(url, cb, method, post, contenttype, auth, timeout) { | |
var requestTimeout, xhr; |
//Here are some more details on the problem, shown in an example: | |
package main | |
import ( | |
"net/http" | |
"runtime" | |
"time" | |
) | |
//The simplest possible http.Handler |
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
"strconv" | |
"strings" |
I hereby claim:
To claim this, I am signing this object: