Skip to content

Commit

Permalink
Use https and rejectUnauthorized flags from state as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
fpereiro committed Feb 27, 2017
1 parent fb1e271 commit da81bf8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hitit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
hitit - v0.2.0
hitit - v0.2.1
Written by Federico Pereiro (fpereiro@gmail.com) and released into the public domain.
Expand Down Expand Up @@ -74,10 +74,10 @@ Please refer to readme.md to read the annotated source (but not yet!).
method: resolve (o.method) || resolve (state.method),
headers: o.headers,
path: resolve (o.path),
rejectUnauthorized: ! o.rejectUnauthorized === false
rejectUnauthorized: ! (o.rejectUnauthorized === undefined ? resolve (state.rejectUnauthorized) === false : o.rejectUnauthorized === false)
};

var protocol = o.https ? https : http;
var protocol = (o.https === undefined ? resolve (state.https) : resolve (o.https)) ? https : http;

var request = protocol.request (opt, function (response) {
response.setEncoding ('utf8');
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "hitit",
"version": "0.2.0",
"version": "0.2.1",
"description": "Minimalistic tool for API testing.",
"dependencies": {
"dale": "4.1.0",
"teishi": "3.9.0"
"dale": "4.2.0",
"teishi": "3.10.0"
},
"main": "hitit.js",
"author": "Federico Pereiro <fpereiro@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ hitit is a minimalistic tool for testing an HTTP API.

## Current status of the project

The current version of hitit, v0.2.0, is considered to be *unstable* and *incomplete*. [Suggestions](https://github.com/fpereiro/hitit/issues) and [patches](https://github.com/fpereiro/hitit/pulls) are welcome. Future changes planned are:
The current version of hitit, v0.2.1, is considered to be *unstable* and *incomplete*. [Suggestions](https://github.com/fpereiro/hitit/issues) and [patches](https://github.com/fpereiro/hitit/pulls) are welcome. Future changes planned are:

- Support for `multipart` uploads and downloads.
- Support for concurrent testing (a.k.a stress testing).
Expand Down

0 comments on commit da81bf8

Please sign in to comment.