ioutil.ReadAll() returns a []byte, which already represents the data in JSON
form. You do not need to marshal it agian; in fact, you do not want to marshal
it again, because then you'll get, as per encoding/json's documentation, the
base64-encoded byte stream as a string, which is not right. Ins
It seems like you encode the valid json string?
If you have a string that is json you should be able to post the string as
is no?
Just make sure you set the application/json content type.
tis 25 okt. 2016 kl 14:32 skrev Rich :
> Hi All,
>
> I have code that is similar to this:
> https://play.gol
Hi All,
I have code that is similar to this:
https://play.golang.org/p/zZ8EQ-R6cb
When I run it I get the following error:
2016/10/25 12:19:56 Body: 400 {"message":"The JSON stream reader doesn't
support chunking."}
So I changed my code to this:
https://play.golang.org/p/NYV5SdCtnt
and I get t