Skip to content

Commit

Permalink
pkg/tool/http: fill in status and statusCode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
braun-jp authored and mpvl committed May 11, 2021
1 parent 48ddb2b commit 7180c7d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/tool/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ func (c *httpCmd) Run(ctx *task.Context) (res interface{}, err error) {
// 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
}
Expand Down

0 comments on commit 7180c7d

Please sign in to comment.