Notable changes to this project will be documented in this file. This project adheres to Semantic Versioning 2.0.0.
- On piping mode, pass address object to listener of event dns.
- Fixed the bug that, on piping mode, event dns is missed if hostname has been resolved and cached before.
- Fixed the bug that, on piping mode, event error is missed.
- dns-agent is depended while htp is resolving domain names.
- Setting rejectUnauthorized added.
- Byeond basic and piping mode, new pipingOnly mode is offered.
- Returned stream in piping mode will emit events and may be catched via
on(<eventName>, ...)
method. - README in Simplifed Chinese language.
- In previous version,
htp/SimpleAgent
will invokecallback()
(if passed) twice if there is some exception throwed incallback()
itself.
In piping mode, you may get data via piping to a writable stream, or reading response.body
and response.bodyBuffer
directly in function callback(err, response)
which is passed as the last argument.
- In previous versions, htp cannot recognized some key fields in response headers if their names are not lowercased.
Now, htp is streamable. E.g.
htp.piping.get('http://www.example.com/').pipe(fs.createWriteStream('index.html'));
htp/sSimpleAgent added.
Add new action property to Errors throwed. Value of the property is made up of the method name and the url joined with a whitespace, e.g.
htp.get('http://www.example.com/', function(err, response) {
if (err) {
err.action == 'GET http://www.example.com/'; // true
}
});
No promise created or returned when callback() functions offered.
HTTPS requests are supported.
Released.
This CHANGELOG.md follows Keep a CHANGELOG.