package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://api.butterix.com/v1/auth/signup"
payload := strings.NewReader(`{
"name": "林晓",
"email": "lin@example.com",
"password": "correct-horse-battery"
}`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}