Releases: JCMais/node-libcurl
v2.3.1-0
Pre-release version - See current changelog at https://github.com/JCMais/node-libcurl/blob/24f91ac78e3c069b22f6ab48627fca59c1ceb3f3/CHANGELOG.md#unreleased
v2.3.0
Probably the last release that curly
is considered experimental.
Breaking Change
-
curly
(andcurly.<method>
) is now able to automatically parse the response body based on the content-type header of the response. #240
Default parsers forapplication/json
(callsJSON.parse
) andtext/*
(converts the rawBuffer
to a string withutf8
encoding) were added. This means that for responses without a matching content-type the rawBuffer
will be returned. This is different from the previous behavior where a string would always be returned.
The default parsers can be overwritten by settingcurly.defaultResponseBodyParsers
to an object with the format:{ 'content-type': (data: Buffer, headers: HeaderInfo[]) => any }
Where
content-type
can be one of these:- the exact content-type.
- a pattern using
*
to match specific parts of the content-type, liketext/*
. - a catch-all pattern: just
*
.
You can also override the parsers using the following options:
curlyResponseBodyParsers
object that will be merged withdefaultResponseBodyParsers
.curlyResponseBodyParser
a parser that will be used for all responses.
It's also possible to set
curlyResponseBodyParser
tofalse
and the data returned will always be the rawBuffer
.Of course, it is still possible to use your own
writeFunction
(libcurlCURLOPT_WRITEFUNCTION
option) to set your own write callback and not rely on this default handling of the response.
As curly
is marked as experimental, this allows us to do a breaking change in a minor version bump. This release should make the curly API more stable and provide a better developer experience, however, the API remains experimental.
Fixed
- Some
curly.<method>
calls not working correctly, to be more specific, all calls that were notget
,post
andhead
. - Errors thrown by the internal
Curl
instance used bycurly
not being re-thrown correctly. - Progress callbacks were not allowing to use default libcurl progress meter (by returning
CurlProgressFunc.Continue
).
Added
- Calling
curly.create(options)
will now return a newcurly
object that will use the passedoptions
as defaults. #247 - TypeScript:
curly
(andcurly.<method>
) now accepts a generic type parameter which will be the type of thedata
returned. By default, this is set toany
. - Added new options to the
curly
API:curlyBaseUrl: string
, if set, their value will always be added as the prefix for the URL.curlyLowerCaseHeaders: boolean
, if set to true, headers will be returned in lower case. Defaults to false. #240
- Added new methods and
CurlFeature
allowing the use of streams to upload and download data without having to setWRITEFUNCTION
and/orREADFUNCTION
manually. #237Curl.setUploadStream
Curl.setStreamProgress
Curl.setStreamResponseHighWaterMark
CurlFeature.StreamResponse
New options were also added to thecurly
API:curlyProgressCallback
curlyStreamResponse
curlyStreamResponseHighWaterMark
curlyStreamUpload
These new features related to streams are only reliable when using a libcurl version >= 7.69.1.
- Support libcurl info
CURLINFO_CERTINFO
. Can be retrieved usinggetInfo("CERTINFO")
. Thanks to @Sergey-Mityukov for most of the work on this. - Support libcurl info
CURLINFO_EFFECTIVE_METHOD
. Requires libcurl >= 7.72.0. - Support libcurl info
CURLINFO_PROXY_ERROR
. UseCurlPx
for constants. Requires libcurl >= 7.73.0. - Support libcurl option
CURLOPT_SSL_EC_CURVES
. Requires libcurl >= 7.73.0. - Added prebuilt binaries for Electron v10.1
- The libcurl version being used by prebuilt binaries is now 7.73.0 and it's not built with c-ares.
Changed
curly
now has 100% code coverage.
Removed
- Removed prebuilt binaries for: Electron v3, Electron v4, Nwjs v0.42, and Nwjs v0.43
v2.3.0-0
Breaking Change
-
curly
(andcurly.<method>
) is now able to automatically parse the response body based on the content-type header of the response. #240
Default parsers forapplication/json
(callsJSON.parse
) andtext/*
(converts the rawBuffer
to a string withutf8
encoding) were added. This means that for responses without a matching content-type the rawBuffer
will be returned. This is different from the previous behavior where a string would always be returned.
The default parsers can be overwritten by settingcurly.defaultResponseBodyParsers
to an object with the format:{ 'content-type': (data: Buffer, headers: HeaderInfo[]) => any }
Where
content-type
can be one of these:- the exact content-type.
- a pattern using
*
to match specific parts of the content-type, liketext/*
. - a catch-all pattern: just
*
.
You can also override the parsers using the following options:
curlyResponseBodyParsers
object that will be merged withdefaultResponseBodyParsers
.curlyResponseBodyParser
a parser that will be used for all responses.
It's also possible to set
curlyResponseBodyParser
tofalse
and the data returned will always be the rawBuffer
.Of course, it is still possible to use your own
writeFunction
(libcurlCURLOPT_WRITEFUNCTION
option) to set your own write callback and not rely on this default handling of the response.
As curly
is marked as experimental, this allows us to do a breaking change in a minor version bump. This release should make the curly API more stable and provide a better developer experience, however, the API remains experimental.
Fixed
- Some
curly.<method>
calls not working correctly, to be more specific, all calls that were notget
,post
andhead
. - Errors thrown by the internal
Curl
instance used bycurly
not being re-thrown correctly. - Progress callbacks were not allowing to use default libcurl progress meter (by returning
CurlProgressFunc.Continue
).
Added
- Calling
curly.create(options)
will now return a newcurly
object that will use the passedoptions
as defaults. #247 - TypeScript:
curly
(andcurly.<method>
) now accepts a generic type parameter which will be the type of thedata
returned. By default, this is set toany
. - Added new options to the
curly
API:curlyBaseUrl: string
, if set, their value will always be added as the prefix for the URL.curlyLowerCaseHeaders: boolean
, if set to true, headers will be returned in lower case. Defaults to false. #240
- Added new methods and
CurlFeature
allowing the use of streams to upload and download data without having to setWRITEFUNCTION
and/orREADFUNCTION
manually. #237Curl.setUploadStream
Curl.setStreamProgress
Curl.setStreamResponseHighWaterMark
CurlFeature.StreamResponse
New options were also added to thecurly
API:curlyProgressCallback
curlyStreamResponse
curlyStreamResponseHighWaterMark
curlyStreamUpload
These new features related to streams are only reliable when using a libcurl version >= 7.69.1.
- Support libcurl info
CURLINFO_CERTINFO
. Can be retrieved usinggetInfo("CERTINFO")
. Thanks to @Sergey-Mityukov for most of the work on this. - Support libcurl info
CURLINFO_EFFECTIVE_METHOD
. Requires libcurl >= 7.72.0. - Support libcurl info
CURLINFO_PROXY_ERROR
. UseCurlPx
for constants. Requires libcurl >= 7.73.0. - Support libcurl option
CURLOPT_SSL_EC_CURVES
. Requires libcurl >= 7.73.0. - Added prebuilt binaries for Electron v10.1
- The libcurl version being used by prebuilt binaries is now 7.73.0 and it's not built with c-ares.
Changed
curly
now has 100% code coverage.
Removed
- Removed prebuilt binaries for: Electron v3, Electron v4, Nwjs v0.42, and Nwjs v0.43
v2.2.1-0
Breaking Change
-
curly
(andcurly.<method>
) is now able to automatically parse the response body based on the content-type header of the response. #240
Default parsers forapplication/json
(callsJSON.parse
) andtext/*
(converts the rawBuffer
to a string withutf8
encoding) were added. This means that for responses without a matching content-type the rawBuffer
will be returned. This is different from the previous behavior where a string would always be returned.
The default parsers can be overwritten by settingcurly.defaultResponseBodyParsers
to an object with the format:{ 'content-type': (data: Buffer, headers: HeaderInfo[]) => any }
Where
content-type
can be one of these:- the exact content-type.
- a pattern using
*
to match specific parts of the content-type, liketext/*
. - a catch-all pattern: just
*
.
You can also override the parsers using the following options:
curlyResponseBodyParsers
object that will be merged withdefaultResponseBodyParsers
.curlyResponseBodyParser
a parser that will be used for all responses.
It's also possible to set
curlyResponseBodyParser
tofalse
and the data returned will always be the rawBuffer
.Of course, it is still possible to use your own
writeFunction
(libcurlCURLOPT_WRITEFUNCTION
option) to set your own write callback and not rely on this default handling of the response.
As curly
is marked as experimental, this allows us to do a breaking change in a minor version bump. This release should make the curly API more stable and provide a better developer experience, however, the API remains experimental.
Fixed
- Some
curly.<method>
calls not working correctly, to be more specific, all calls that were notget
,post
andhead
. - Errors thrown by the internal
Curl
instance used bycurly
not being re-thrown correctly. - Progress callbacks were not allowing to use default libcurl progress meter (by returning
CurlProgressFunc.Continue
).
Added
- Calling
curly.create(options)
will now return a newcurly
object that will use the passedoptions
as defaults. #247 - TypeScript:
curly
(andcurly.<method>
) now accepts a generic type parameter which will be the type of thedata
returned. By default, this is set toany
. - Added new options to the
curly
API:curlyBaseUrl: string
, if set, their value will always be added as the prefix for the URL.curlyLowerCaseHeaders: boolean
, if set to true, headers will be returned in lower case. Defaults to false. #240
- Added new methods and
CurlFeature
allowing the use of streams to upload and download data without having to setWRITEFUNCTION
and/orREADFUNCTION
manually. #237Curl.setUploadStream
Curl.setStreamProgress
Curl.setStreamResponseHighWaterMark
CurlFeature.StreamResponse
New options were also added to thecurly
API:curlyProgressCallback
curlyStreamResponse
curlyStreamResponseHighWaterMark
curlyStreamUpload
These new features related to streams are only reliable when using a libcurl version >= 7.69.1.
- Support libcurl info
CURLINFO_CERTINFO
. Can be retrieved usinggetInfo("CERTINFO")
. Thanks to @Sergey-Mityukov for most of the work on this. - Support libcurl info
CURLINFO_EFFECTIVE_METHOD
. Requires libcurl >= 7.72.0. - Support libcurl info
CURLINFO_PROXY_ERROR
. UseCurlPx
for constants. Requires libcurl >= 7.73.0. - Support libcurl option
CURLOPT_SSL_EC_CURVES
. Requires libcurl >= 7.73.0.
v2.2.0
Fixed
- Fix
curly.get
not working correctly (#230) - Fix not resetting
CURLOPT_TRAILERDATA
when duplicating anEasy
instance (7bf3a51)
Added
- Added initial support to the
CURLMOPT_PUSHFUNCTION
libcurl multi option. (#232) (b8d0fac) - Added
private
member to theEasyNativeBinding
typescript class, you can set this value on theEasy
instances to anything, and Typescript should not complain. - Adde prebuilt binaries for Electron v9
Changed
- Improved Typescript types / documentation for some libcurl options. (63a71b7)
v2.2.0-1
- docs: update CHANGELOG.md ad02eff
- feat: add support the CURLMOPT_PUSHFUNCTION libcurl multi option b8d0fac
- docs: update CHANGELOG.md 788c61d
- deps: upgrade node-gyp and other deps and add scripts to generate the compile_commands.json file 7f7b9a6
- docs: add link to our Discord Server to the README.md 135869d
- chore: add [dD]ebug and [rR]elease folders to gitignore cc1187d
- docs: improve README.md d875f66
- docs: update api docs to and improve Typescript types 63a71b7
- scripts: update script that generates libcurl options documentation 5f118bd
- docs: add this typehint on some Easy#setOpt/Curl#setOpt calls 026c814
- fix: not resetting CURLOPT_TRAILERDATA when duplicating an Easy handle 7bf3a51
- examples: remove unecessary function on protobuf example [skip ci] 02f813b
- examples: remove unecessary require on protobuf example [skip ci] 54f55f1
- examples: add example showing how to send binary data - in this specific case, protobuf encoded data be5df47
- docs: add note on README about the READFUNCTION option 3989e17
- docs: improve documentation on the end event listener callback 2c0b89d
- docs: update docs with nojekyll plugin [skip ci] 63cf3d7
- docs: add typedoc-plugin-nojekyll [skip ci] 86a148f
- fix: httpMethodOptions for curly get (#230) b9ff102
- docs: add magic .nojekyll file [skip ci] 6695c91
- docs: regenerate docs folder [skip ci] 3f4731d
- docs: add updated documentation and remove github actions - gh pages is going to be deployed from master docs folder [skip ci] 4cec7fb
v2.1.3
Fixed
v2.1.2
had a caching issue on during the dist files generation, which caused it to not build some required files.
v2.1.2
DEPRECATED: Due to caching issues while building the distribution files, this build is broken, use 2.1.3 instead. Sorry about that.
Fixed
- Fix
curly.post
andcurly.head
using wrong libcurl options to set the HTTP Method. - Fix
postinstall
script not working properly. - Setting the
HTTPPOST
option tonull
would, wrongly, throw an Error. - Setting any string option to
null
would, wrongly, throw an Error.
Added
- We now have API docs! 🥳 http://jcmais.github.io/node-libcurl/modules/_index_.html
Thanks to typedoc - Added back prebuilt binaries for:
- Electron v3, v4 and v5
- Added
isMonitoringSockets
boolean readonly property toEasy
instances, it istrue
whenmonitorSocketEvents
has been called on thatEasy
instance. - Added
CurlVersion
enum to be used with therawFeatures
property returned fromCurl.getVersionInfo
.
v2.1.2-1
v2.1.2-0
- docs: add COMMON_ISSUES and more examples to the README.md 703c951
- fix: postinstall script not working properly - fixes #220 050a3fc
- fix: curly.post and curly.head using wrong libcurl options to set the HTTP method 357f01d
- benchmark: add benchmark result for a linux machine (#218) acfa47a
- docs: update CHANGELOG.md [skip ci] 889db0d