resource receives the parameters
example: http://example.com/show-data?json={"fob":"bar"}
in case of GET request, all clear and work well.
urlStr := "http://87.236.22.7:1488/test/show-data"
json := `"foo":"bar"`
r, _ := http.Get(urlStr+`?json=`+json)
println(r.Status)
200 OK
But how it shoud be done when use POST request?
i try
urlStr := "http://87.236.22.7:1488/test/show-data"
json := `{"foo":"bar"}`
form := url.Values{}
form.Set("json", json)
println(form.Encode())
post, _ := http.PostForm(urlStr, form)
println(post.Status)
400 Bad Request
json parameter is missing
but it`s not work.