Skip to content

Commit f1417a5

Browse files
automatic update
1 parent 1ae56c1 commit f1417a5

5 files changed

Lines changed: 164 additions & 0 deletions

File tree

docs/reference/cpp/HttpHeader.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: HttpHeader
3+
sidebar_label: HttpHeader
4+
sidebar_position: 3
5+
---
6+
<!-- auto-generated by generator/ — do not edit -->
7+
8+
# HttpHeader struct
9+
10+
A single HTTP header (name and value pair) to be sent with a web request.
11+
12+
```cpp
13+
struct HttpHeader
14+
```
15+
16+
## Fields
17+
18+
| Field | Summary |
19+
| --- | --- |
20+
| [`Name`](#name) | The name of the HTTP header (eg. “Authorization”). |
21+
| [`Value`](#value) | The value of the HTTP header. |
22+
23+
24+
### Name {#name}
25+
26+
The name of the HTTP header (eg. “Authorization”).
27+
28+
### Value {#value}
29+
30+
The value of the HTTP header.
31+
32+
___
33+
*Generated from `Velopack (C++ headers)`*

docs/reference/cpp/HttpOptions.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: HttpOptions
3+
sidebar_label: HttpOptions
4+
sidebar_position: 3
5+
---
6+
<!-- auto-generated by generator/ — do not edit -->
7+
8+
# HttpOptions struct
9+
10+
Options to customize HTTP requests (custom headers, timeout, etc).
11+
12+
```cpp
13+
struct HttpOptions
14+
```
15+
16+
## Fields
17+
18+
| Field | Summary |
19+
| --- | --- |
20+
| [`TimeoutMilliseconds`](#velopack-httpoptions-timeoutmilliseconds) | Timeout applied to the entire request (connection + transfer), in milliseconds. The default of 0 means requests never time out. |
21+
| [`Headers`](#headers) | Additional headers to send with each request. |
22+
23+
24+
### TimeoutMilliseconds {#velopack-httpoptions-timeoutmilliseconds}
25+
26+
```cpp
27+
uint64_t TimeoutMilliseconds;
28+
```
29+
30+
Timeout applied to the entire request (connection + transfer), in milliseconds. The default of 0 means requests never time out.
31+
32+
### Headers {#headers}
33+
34+
Additional headers to send with each request.
35+
36+
___
37+
*Generated from `Velopack (C++ headers)`*

docs/reference/cpp/Sources/HttpSource.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class HttpSource :public IUpdateSourcePointer
2020
| Constructor | Summary |
2121
| --- | --- |
2222
| [`HttpSource`](#velopack-httpsource-httpsource-std-stringconst) | Creates a new HttpSource. |
23+
| [`HttpSource`](#velopack-httpsource-httpsource-std-stringconst-velopack-httpoptionsconst) | Creates a new HttpSource with custom HTTP options. |
2324
2425
2526
### HttpSource(httpUrl) {#velopack-httpsource-httpsource-std-stringconst}
@@ -37,5 +38,21 @@ Creates a new HttpSource.
3738
| `httpUrl` | The URL to the releases feed. |
3839

3940

41+
### HttpSource(httpUrl, options) {#velopack-httpsource-httpsource-std-stringconst-velopack-httpoptionsconst}
42+
43+
```cpp
44+
HttpSource(std::string const& httpUrl, Velopack::HttpOptions const& options);
45+
```
46+
47+
Creates a new HttpSource with custom HTTP options.
48+
49+
**Parameters**
50+
51+
| Name | Description |
52+
| --- | --- |
53+
| `httpUrl` | The URL to the releases feed. |
54+
| `options` | HTTP options (custom headers, timeout) applied to all requests made by this source. |
55+
56+
4057
___
4158
*Generated from `Velopack (C++ headers)`*

docs/reference/cpp/c-api.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ enum vpkc_update_check_t
1717

1818
using vpkc_update_source_t = void;
1919

20+
struct vpkc_http_header_t;
21+
22+
struct vpkc_http_options_t;
23+
2024
using vpkc_release_feed_delegate_t = char*(*)(void*, char const*);
2125

2226
using vpkc_free_release_feed_t = void(*)(void*, char*);
@@ -45,6 +49,8 @@ extern "C"
4549

4650
vpkc_update_source_t* vpkc_new_source_http_url(char const* psz_http_url);
4751

52+
vpkc_update_source_t* vpkc_new_source_http_url_with_options(char const* psz_http_url, vpkc_http_options_t* p_options);
53+
4854
vpkc_update_source_t* vpkc_new_source_github(char const* psz_repo_url, char const* psz_access_token, bool b_prerelease);
4955

5056
vpkc_update_source_t* vpkc_new_source_gitlab(char const* psz_repo_url, char const* psz_access_token, bool b_prerelease);
@@ -138,6 +144,60 @@ Opaque type for a Velopack UpdateSource. Must be freed with `vpkc_free_update_so
138144

139145
-----
140146

147+
## Struct `vpkc_http_header_t`
148+
149+
``` cpp
150+
struct vpkc_http_header_t
151+
{
152+
char* Name;
153+
154+
char* Value;
155+
};
156+
```
157+
158+
A single HTTP header (name and value pair) to be sent with a web request.
159+
160+
#### Member variables
161+
162+
- `Name` - The name of the HTTP header (eg. “Authorization”).
163+
- `Value` - The value of the HTTP header.
164+
165+
-----
166+
167+
## Struct `vpkc_http_options_t`
168+
169+
``` cpp
170+
struct vpkc_http_options_t
171+
{
172+
vpkc_http_header_t** Headers;
173+
174+
size_t HeadersCount;
175+
176+
uint64_t TimeoutMilliseconds;
177+
};
178+
```
179+
180+
Options to customize HTTP requests (custom headers, timeout, etc).
181+
182+
#### Member variables
183+
184+
- `Headers` - Additional headers to send with each request.
185+
- `HeadersCount` - The number of elements in the Headers array.
186+
187+
### Variable `vpkc_http_options_t::TimeoutMilliseconds`
188+
189+
``` cpp
190+
uint64_t TimeoutMilliseconds;
191+
```
192+
193+
Timeout applied to the entire request (connection + transfer), in milliseconds.
194+
195+
The default of 0 means requests never time out.
196+
197+
-----
198+
199+
-----
200+
141201
## Type alias `vpkc_release_feed_delegate_t`
142202

143203
``` cpp
@@ -404,6 +464,21 @@ Create a new HttpSource update source for a given HTTP URL.
404464

405465
-----
406466

467+
## Function `vpkc_new_source_http_url_with_options`
468+
469+
``` cpp
470+
vpkc_update_source_t* vpkc_new_source_http_url_with_options(char const* psz_http_url, vpkc_http_options_t* p_options);
471+
```
472+
473+
Create a new HttpSource update source for a given HTTP URL, with custom HTTP options.
474+
475+
476+
- **`psz_http_url`** — The URL to a remote update server.
477+
- **`p_options`** — Optional HTTP options (custom headers, timeout). Can be null.
478+
- **Returns** — A new vpkc\_update\_source\_t instance, or null on error.
479+
480+
-----
481+
407482
## Function `vpkc_new_source_github`
408483
409484
``` cpp

docs/reference/cpp/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ sidebar_position: 0
2828

2929
| Type | Summary |
3030
| --- | --- |
31+
| [`HttpHeader`](./HttpHeader.md) | A single HTTP header (name and value pair) to be sent with a web request. |
32+
| [`HttpOptions`](./HttpOptions.md) | Options to customize HTTP requests (custom headers, timeout, etc). |
3133
| [`UpdateInfo`](./UpdateInfo.md) | Holds information about the current version and pending updates, such as how many there are, and access to release notes. |
3234
| [`UpdateOptions`](./UpdateOptions.md) | Options to customise the behaviour of UpdateManager. |
3335
| [`VelopackAsset`](./VelopackAsset.md) | An individual Velopack asset, could refer to an asset on-disk or in a remote package feed. |

0 commit comments

Comments
 (0)