17 lines
308 B
Go
17 lines
308 B
Go
package main
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"net/http"
|
|
)
|
|
|
|
// Handler is the entry point for this fission function
|
|
func Handler(w http.ResponseWriter, r *http.Request) {
|
|
bytes, err := ioutil.ReadAll(r.Body)
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
w.Write(bytes)
|
|
}
|