copy http.go
copy boilerplate
encodeBody