pkg/tool/http: fill in status and statusCode
Theses were defined in the schema but never filled
Change-Id: I4ae2ee53ffd0291ed4f10a75dcadade711594894
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9721
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/pkg/tool/http/http.go b/pkg/tool/http/http.go
index d7e5f33..fa55264 100644
--- a/pkg/tool/http/http.go
+++ b/pkg/tool/http/http.go
@@ -83,9 +83,11 @@
// parse response body and headers
return map[string]interface{}{
"response": map[string]interface{}{
- "body": string(b),
- "header": resp.Header,
- "trailer": resp.Trailer,
+ "status": resp.Status,
+ "statusCode": resp.StatusCode,
+ "body": string(b),
+ "header": resp.Header,
+ "trailer": resp.Trailer,
},
}, err
}