Hello psirt,
I am looking to get the content of an advisories ID, as I can do with postman using the Authorization Bearer;
GOLANG APICLient (DefaultApi.SecurityAdvisoriesAdvisoryAdvisoryIdGet) return a 200 ok, but with an empty body,
contrary of postman which return a json body content.
Where is the body content? (once I get the bytes, I'll json unmarshal it)
ciscoConf := swagger.NewConfiguration()
ciscoConf.AddDefaultHeader("Authorization", "Bearer Pm6Bx4X5MutGpuyUpFkqy1DEGP00")
ciscoApi := swagger.NewAPIClient(ciscoConf)
ctx := context.Background()
apiQ, _ := ciscoApi.DefaultApi.SecurityAdvisoriesAdvisoryAdvisoryIdGet(ctx, "cisco-sa-20181003-asa-dma-dos")
//swagger.DefaultApiService().SecurityAdvisoriesAdvisoryAdvisoryIdGet(ctx, "cisco-sa-20181003-asa-dma-dos")
println(apiQ.ContentLength)
apiQContent, _ := ioutil.ReadAll(apiQ.Body)
println(string(apiQContent))
apirR :=swagger.NewAPIResponse(apiQ)
println (apirR.ContentLength)
println("end")
Value of returned Response object DefaultApi.SecurityAdvisoriesAdvisoryAdvisoryIdGet:
*apiQ = {*net/http.Response}
Status = "200 OK"
StatusCode = 200
Proto = "HTTP/1.1"
ProtoMajor = 1
ProtoMinor = 1
Header = {net/http.Header}
Body = {io.ReadCloser}
ContentLength = -1
TransferEncoding = {[]string} len:1, cap:1
Close = true
Uncompressed = true
Trailer = {net/http.Header} nil
*Request = {*net/http.Request}
*TLS = {*crypto/tls.ConnectionState}