hi i want to send back the response body , currently i am getting only status back .
jumbo_rod_url :="some url "
body := strings.NewReader(string(ctx.Request.Body()))
fmt.Println("printing body",body)
req, err := http.NewRequest("POST", jumbo_rod_url,body)
req.Header.Add("Authorization", "Bearer "+jumbo_token[2])
req.Header.Add("Content-Type", "application/json")
if err != nil {
log.Panic(err)
}
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
fmt.Fprintf(ctx,"%s",resp)
fmt.Printf("%s","final response ",resp)
//response i am geting
// {200 OK %!s(int=200) HTTP/1.1 %!s(int=1) %!s(int=1) map[X-Content-//Type-Options:[nosniff] X-Xss-Protection:[1;mode=block]
fmt.Println("check",resp.Body)
//response i need to get as in swagger
///
{
“scope”: “/client”,
“id”: {
“member_id”: “”
},
“access_token”: “”,
“token_type”: “bearer”,
“expires_in”: 3600,
“refresh_token”: “”,
“refresh_expires_in”: 3600
}
}