Skip to content

Releases: JCMais/node-libcurl

v2.3.1-0

08 Mar 13:22
965733d
Compare
Choose a tag to compare

v2.3.0

15 Nov 14:18
v2.3.0
95c6504
Compare
Choose a tag to compare

Probably the last release that curly is considered experimental.

Breaking Change

  • curly (and curly.<method>) is now able to automatically parse the response body based on the content-type header of the response. #240
    Default parsers for application/json (calls JSON.parse) and text/* (converts the raw Buffer to a string with utf8 encoding) were added. This means that for responses without a matching content-type the raw Buffer will be returned. This is different from the previous behavior where a string would always be returned.
    The default parsers can be overwritten by setting curly.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, like text/*.
    • a catch-all pattern: just *.

    You can also override the parsers using the following options:

    • curlyResponseBodyParsers object that will be merged with defaultResponseBodyParsers.
    • curlyResponseBodyParser a parser that will be used for all responses.

    It's also possible to set curlyResponseBodyParser to false and the data returned will always be the raw Buffer.

    Of course, it is still possible to use your own writeFunction (libcurl CURLOPT_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 not get, post and head.
  • Errors thrown by the internal Curl instance used by curly 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 new curly object that will use the passed options as defaults. #247
  • TypeScript: curly (and curly.<method>) now accepts a generic type parameter which will be the type of the data returned. By default, this is set to any.
  • 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 set WRITEFUNCTION and/or READFUNCTION manually. #237
    • Curl.setUploadStream
    • Curl.setStreamProgress
    • Curl.setStreamResponseHighWaterMark
    • CurlFeature.StreamResponse
      New options were also added to the curly 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 using getInfo("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. Use CurlPx 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...v2.3.0

v2.3.0-0

30 Oct 22:13
v2.3.0-0
aea8c77
Compare
Choose a tag to compare
v2.3.0-0 Pre-release
Pre-release

Breaking Change

  • curly (and curly.<method>) is now able to automatically parse the response body based on the content-type header of the response. #240
    Default parsers for application/json (calls JSON.parse) and text/* (converts the raw Buffer to a string with utf8 encoding) were added. This means that for responses without a matching content-type the raw Buffer will be returned. This is different from the previous behavior where a string would always be returned.
    The default parsers can be overwritten by setting curly.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, like text/*.
    • a catch-all pattern: just *.

    You can also override the parsers using the following options:

    • curlyResponseBodyParsers object that will be merged with defaultResponseBodyParsers.
    • curlyResponseBodyParser a parser that will be used for all responses.

    It's also possible to set curlyResponseBodyParser to false and the data returned will always be the raw Buffer.

    Of course, it is still possible to use your own writeFunction (libcurl CURLOPT_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 not get, post and head.
  • Errors thrown by the internal Curl instance used by curly 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 new curly object that will use the passed options as defaults. #247
  • TypeScript: curly (and curly.<method>) now accepts a generic type parameter which will be the type of the data returned. By default, this is set to any.
  • 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 set WRITEFUNCTION and/or READFUNCTION manually. #237
    • Curl.setUploadStream
    • Curl.setStreamProgress
    • Curl.setStreamResponseHighWaterMark
    • CurlFeature.StreamResponse
      New options were also added to the curly 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 using getInfo("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. Use CurlPx 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.0...v2.3.0-0

v2.2.1-0

14 Oct 22:06
v2.2.1-0
cab0538
Compare
Choose a tag to compare
v2.2.1-0 Pre-release
Pre-release

Breaking Change

  • curly (and curly.<method>) is now able to automatically parse the response body based on the content-type header of the response. #240
    Default parsers for application/json (calls JSON.parse) and text/* (converts the raw Buffer to a string with utf8 encoding) were added. This means that for responses without a matching content-type the raw Buffer will be returned. This is different from the previous behavior where a string would always be returned.
    The default parsers can be overwritten by setting curly.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, like text/*.
    • a catch-all pattern: just *.

    You can also override the parsers using the following options:

    • curlyResponseBodyParsers object that will be merged with defaultResponseBodyParsers.
    • curlyResponseBodyParser a parser that will be used for all responses.

    It's also possible to set curlyResponseBodyParser to false and the data returned will always be the raw Buffer.

    Of course, it is still possible to use your own writeFunction (libcurl CURLOPT_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 not get, post and head.
  • Errors thrown by the internal Curl instance used by curly 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 new curly object that will use the passed options as defaults. #247
  • TypeScript: curly (and curly.<method>) now accepts a generic type parameter which will be the type of the data returned. By default, this is set to any.
  • 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 set WRITEFUNCTION and/or READFUNCTION manually. #237
    • Curl.setUploadStream
    • Curl.setStreamProgress
    • Curl.setStreamResponseHighWaterMark
    • CurlFeature.StreamResponse
      New options were also added to the curly 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 using getInfo("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. Use CurlPx for constants. Requires libcurl >= 7.73.0.
  • Support libcurl option CURLOPT_SSL_EC_CURVES. Requires libcurl >= 7.73.0.

v2.2.0...v2.2.1-0

v2.2.0

14 Jul 21:43
v2.2.0
fd5cc82
Compare
Choose a tag to compare

Fixed

  • Fix curly.get not working correctly (#230)
  • Fix not resetting CURLOPT_TRAILERDATA when duplicating an Easy instance (7bf3a51)

Added

  • Added initial support to the CURLMOPT_PUSHFUNCTION libcurl multi option. (#232) (b8d0fac)
  • Added private member to the EasyNativeBinding typescript class, you can set this value on the Easy 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

26 Jun 21:49
v2.2.0-1
b92a001
Compare
Choose a tag to compare
v2.2.0-1 Pre-release
Pre-release
  • 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...v2.2.0-1

v2.1.3

02 Jun 13:10
v2.1.3
0b64c78
Compare
Choose a tag to compare

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...v2.1.3

v2.1.2

01 Jun 21:49
v2.1.2
d15ed55
Compare
Choose a tag to compare

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 and curly.head using wrong libcurl options to set the HTTP Method.
  • Fix postinstall script not working properly.
  • Setting the HTTPPOST option to nullwould, 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 to Easy instances, it is true
    when monitorSocketEvents has been called on that Easy instance.
  • Added CurlVersion enum to be used with the rawFeatures property returned from Curl.getVersionInfo.

v2.1.1...v2.1.2

v2.1.2-1

09 May 20:21
v2.1.2-1
9aa421d
Compare
Choose a tag to compare
v2.1.2-1 Pre-release
Pre-release
  • chore: revert prerelease version bump 8f3bc94
  • 2.1.3-0 b69ead6
  • docs: update changelog a601651
  • chore: fix some code description to match the correct symbols 8051f1e
  • ci: re-add prebuilt binaries for electron v3, v4 and v5 401e83f

v2.1.2-0...vv2.1.2-1

v2.1.2-0

09 May 15:51
v2.1.2-0
2b7e5dc
Compare
Choose a tag to compare
v2.1.2-0 Pre-release
Pre-release
  • 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

v2.1.1...v2.1.2-0