Skip to content

Instantly share code, notes, and snippets.

View adaschevici's full-sized avatar
🦙
Prompting change

Artur Daschevici adaschevici

🦙
Prompting change
View GitHub Profile
extern crate hyper;
extern crate encoding;
use hyper::client::Client;
use hyper::header::{Headers,ContentType,UserAgent};
use hyper::mime::Mime;
use std::io::Read;
use encoding::label::encoding_from_whatwg_label;
use encoding::{Encoding, DecoderTrap};
@adaschevici
adaschevici / api.go
Created June 18, 2016 10:48 — forked from peterhellberg/api.go
A tiny example API written in Go using Martini and Redigo
package main
import (
"flag"
"fmt"
"net/http"
"github.com/codegangsta/martini"
"github.com/garyburd/redigo/redis"
"github.com/martini-contrib/render"