Skip to content

Commit

Permalink
Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel authored and fabricereix committed Jun 19, 2022
1 parent af25397 commit e354efb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/hurl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,13 @@ fn main() {
&& hurl_result.errors().is_empty()
&& !cli_options.interactive
{
// default
// last entry + response + body
// By default, we output the body response bytes of the last entry
if let Some(entry_result) = hurl_result.entries.last() {
if let Some(response) = entry_result.response.clone() {
let mut output = vec![];

// If include options is set, we output the HTTP response headers
// with status and version (to mimic curl outputs)
if cli_options.include {
let status_line =
format!("HTTP/{} {}\n", response.version, response.status);
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl/src/runner/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub fn run(
let mut errors = vec![];
let time_in_ms = http_response.duration.as_millis();

// Last call
// We runs capture and asserts on the last HTTP request/response chains.
if i == calls.len() - 1 {
captures = match entry.response.clone() {
None => vec![],
Expand Down

0 comments on commit e354efb

Please sign in to comment.