Skip to content

Commit

Permalink
gh-26 Improve verbose output
Browse files Browse the repository at this point in the history
Add a new line to body in verbose one if body does not already
end with a new line

Closes gh-26
  • Loading branch information
jonathonmcmurray committed Jan 28, 2020
1 parent 15c140c commit 4659662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion req/req.q
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ send:{[m;u;hd;p;v]
q:addheaders[q]; //get dictionary of HTTP headers for request
r:hs d:buildquery[q]; //build query and execute
if[v;-1"-- REQUEST --\n",string[hs],"\n",d]; //if verbose, log request
if[v;-1"-- RESPONSE --\n",r]; //if verbose, log response
if[v;-1"-- RESPONSE --\n",r,("\n"<>last r)#"\n"]; //if verbose, log response
r:formatresp r; //format response to headers & body
if[(sc:`$"Set-Cookie") in k:key r 0; //check for Set-Cookie headers
.cookie.addcookie[q[`url;`host]]'[value[r 0]where k=sc]]; //set any cookies necessary
Expand Down

0 comments on commit 4659662

Please sign in to comment.