Skip to content

Commit

Permalink
feat: support curl_blob options
Browse files Browse the repository at this point in the history
Fixes #253.
  • Loading branch information
johnwchadwick committed Jul 23, 2021
1 parent 0423c74 commit 5a24ec6
Show file tree
Hide file tree
Showing 13 changed files with 630 additions and 20 deletions.
8 changes: 8 additions & 0 deletions lib/Curl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
DataCallbackOptions,
ProgressCallbackOptions,
StringListOptions,
BlobListOptions,
CurlOptionName,
SpecificOptions,
CurlOptionValueType,
Expand Down Expand Up @@ -1226,6 +1227,13 @@ interface Curl {
* Official libcurl documentation: [`curl_easy_setopt()`](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: StringListOptions, value: string[] | null): this
/**
* Use {@link "Curl".Curl.option|`Curl.option`} for predefined constants.
*
*
* Official libcurl documentation: [`curl_easy_setopt()`](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: BlobListOptions, value: Buffer | string | null): this
/**
* Use {@link "Curl".Curl.option|`Curl.option`} for predefined constants.
*
Expand Down
10 changes: 9 additions & 1 deletion lib/generated/CurlInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// This file was generated by scripts/build-constants.js on 2020-10-11T15:59:27.934Z
// This file was generated by scripts/build-constants.js on 2021-07-23T03:53:26.721Z
// Do not edit manually

/**
Expand Down Expand Up @@ -305,6 +305,13 @@ export interface CurlInfo {
*/
readonly REDIRECT_URL: 'REDIRECT_URL'

/**
* Referrer header. See CURLINFO_REFERER(3)
*
* Official libcurl documentation: : [https://curl.haxx.se/libcurl/c/CURLINFO_REFERER.html](https://curl.haxx.se/libcurl/c/CURLINFO_REFERER.html)
*/
readonly REFERER: 'REFERER'

/**
* Number of bytes sent in the issued HTTP requests.
*
Expand Down Expand Up @@ -520,6 +527,7 @@ export type CurlInfoName =
| 'REDIRECT_TIME'
| 'REDIRECT_TIME_T'
| 'REDIRECT_URL'
| 'REFERER'
| 'REQUEST_SIZE'
| 'RESPONSE_CODE'
| 'RETRY_AFTER'
Expand Down
Loading

0 comments on commit 5a24ec6

Please sign in to comment.