Re: [go-nuts] Http/net - post and decode json data part

2018-08-14 Thread nicolas_boiteux via golang-nuts
i try to parse the return of httpbin :) Le mardi 14 août 2018 18:00:36 UTC+2, Ian Davis a écrit : > > > On Tue, 14 Aug 2018, at 12:44 PM, nicolas_boiteux via golang-nuts wrote: > > the raw of response.body is this > > > { > "args": {}, > "data": "{\"firstname\":\"Nic\",\"lastname\":\"Raboy\"

Re: [go-nuts] Http/net - post and decode json data part

2018-08-14 Thread Ian Davis
On Tue, 14 Aug 2018, at 12:44 PM, nicolas_boiteux via golang-nuts wrote:> the raw of response.body is this > > > { "args": {}, "data": > "{\"firstname\":\"Nic\",\"lastname\":\"Raboy\"}", "files": {}, > "form": {}, "headers": {"Accept-Encoding": "gzip", > "Connection": "close","Cont

Re: [go-nuts] Http/net - post and decode json data part

2018-08-14 Thread nicolas_boiteux via golang-nuts
the raw of response.body is this { "args": {}, "data": "{\"firstname\":\"Nic\",\"lastname\":\"Raboy\"}", "files": {}, "form": {}, "headers": { "Accept-Encoding": "gzip", "Connection": "close", "Content-Length": "38", "Content-Type": "application/json", "Host"

Re: [go-nuts] Http/net - post and decode json data part

2018-08-14 Thread nicolas_boiteux via golang-nuts
the raw of response.body is this { "args": {}, "data": "{\"firstname\":\"Nic\",\"lastname\":\"Raboy\"}", "files": {}, "form": {}, "headers": { "Accept-Encoding": "gzip", "Connection": "close", "Content-Length": "38", "Content-Type": "application/json", "Host"

Re: [go-nuts] Http/net - post and decode json data part

2018-08-14 Thread Ian Davis
On Tue, 14 Aug 2018, at 11:19 AM, nicolas_boiteux via golang-nuts wrote:> Hello > > I need some assistance to decode a json content > > I tried to use only usefull code to do it but don't success to > retrieve the data part of the json result.> > > var user struct {Firstname string `j

[go-nuts] Http/net - post and decode json data part

2018-08-14 Thread nicolas_boiteux via golang-nuts
Hello I need some assistance to decode a json content I tried to use only usefull code to do it but don't success to retrieve the data part of the json result. var user struct { Firstname string `json: "firstname"` Lastname string `json: "lastname"` Origin string `"