Skip to content

Commit 32238d1

Browse files
tauri-botLaegel
andauthored
chore(docs): Update Rust & TS docs (tauri-apps#246)
Co-authored-by: Laegel <[email protected]>
1 parent a034fb2 commit 32238d1

File tree

149 files changed

+20305
-5780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+20305
-5780
lines changed

docs/en/api/js/classes/http.body.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
title: "Class: Body"
23
sidebar_label: "Body"
34
custom_edit_url: null
45
hide_title: true
@@ -18,7 +19,7 @@ The body object to be used on POST and PUT requests.
1819

1920
#### Defined in
2021

21-
[http.ts:45](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L45)
22+
[http.ts:45](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L45)
2223

2324
___
2425

@@ -28,13 +29,13 @@ ___
2829

2930
#### Defined in
3031

31-
[http.ts:44](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L44)
32+
[http.ts:44](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L44)
3233

3334
## Methods
3435

3536
### bytes
3637

37-
`Static` **bytes**(`bytes`): [Body](http.body.md)
38+
`Static` **bytes**(`bytes`): [`Body`](http.body.md)
3839

3940
Creates a new byte array body.
4041

@@ -46,67 +47,67 @@ Creates a new byte array body.
4647

4748
#### Returns
4849

49-
[Body](http.body.md)
50+
[`Body`](http.body.md)
5051

5152
The body object ready to be used on the POST and PUT requests.
5253

5354
#### Defined in
5455

55-
[http.ts:93](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L93)
56+
[http.ts:93](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L93)
5657

5758
___
5859

5960
### form
6061

61-
`Static` **form**(`data`): [Body](http.body.md)
62+
`Static` **form**(`data`): [`Body`](http.body.md)
6263

6364
Creates a new form data body.
6465

6566
#### Parameters
6667

6768
| Name | Type | Description |
6869
| :------ | :------ | :------ |
69-
| `data` | `Record`<string, [Part](../modules/http.md#part)\> | The body data. |
70+
| `data` | `Record`<`string`, [`Part`](../modules/http.md#part)\> | The body data. |
7071

7172
#### Returns
7273

73-
[Body](http.body.md)
74+
[`Body`](http.body.md)
7475

7576
The body object ready to be used on the POST and PUT requests.
7677

7778
#### Defined in
7879

79-
[http.ts:60](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L60)
80+
[http.ts:60](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L60)
8081

8182
___
8283

8384
### json
8485

85-
`Static` **json**(`data`): [Body](http.body.md)
86+
`Static` **json**(`data`): [`Body`](http.body.md)
8687

8788
Creates a new JSON body.
8889

8990
#### Parameters
9091

9192
| Name | Type | Description |
9293
| :------ | :------ | :------ |
93-
| `data` | `Record`<any, any\> | The body JSON object. |
94+
| `data` | `Record`<`any`, `any`\> | The body JSON object. |
9495

9596
#### Returns
9697

97-
[Body](http.body.md)
98+
[`Body`](http.body.md)
9899

99100
The body object ready to be used on the POST and PUT requests.
100101

101102
#### Defined in
102103

103-
[http.ts:71](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L71)
104+
[http.ts:71](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L71)
104105

105106
___
106107

107108
### text
108109

109-
`Static` **text**(`value`): [Body](http.body.md)
110+
`Static` **text**(`value`): [`Body`](http.body.md)
110111

111112
Creates a new UTF-8 string body.
112113

@@ -118,10 +119,10 @@ Creates a new UTF-8 string body.
118119

119120
#### Returns
120121

121-
[Body](http.body.md)
122+
[`Body`](http.body.md)
122123

123124
The body object ready to be used on the POST and PUT requests.
124125

125126
#### Defined in
126127

127-
[http.ts:82](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L82)
128+
[http.ts:82](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L82)

docs/en/api/js/classes/http.client.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
title: "Class: Client"
23
sidebar_label: "Client"
34
custom_edit_url: null
45
hide_title: true
@@ -16,13 +17,13 @@ hide_title: true
1617

1718
#### Defined in
1819

19-
[http.ts:158](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L158)
20+
[http.ts:158](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L158)
2021

2122
## Methods
2223

2324
### delete
2425

25-
**delete**<T\>(`url`, `options?`): `Promise`<[Response](http.response.md)<T\>\>
26+
**delete**<`T`\>(`url`, `options?`): `Promise`<[`Response`](http.response.md)<`T`\>\>
2627

2728
Makes a DELETE request.
2829

@@ -37,39 +38,39 @@ Makes a DELETE request.
3738
| Name | Type | Description |
3839
| :------ | :------ | :------ |
3940
| `url` | `string` | The request URL. |
40-
| `options?` | [RequestOptions](../modules/http.md#requestoptions) | The request options. |
41+
| `options?` | [`RequestOptions`](../modules/http.md#requestoptions) | The request options. |
4142

4243
#### Returns
4344

44-
`Promise`<[Response](http.response.md)<T\>\>
45+
`Promise`<[`Response`](http.response.md)<`T`\>\>
4546

4647
A promise resolving to the response.
4748

4849
#### Defined in
4950

50-
[http.ts:299](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L299)
51+
[http.ts:299](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L299)
5152

5253
___
5354

5455
### drop
5556

56-
**drop**(): `Promise`<void\>
57+
**drop**(): `Promise`<`void`\>
5758

5859
Drops the client instance.
5960

6061
#### Returns
6162

62-
`Promise`<void\>
63+
`Promise`<`void`\>
6364

6465
#### Defined in
6566

66-
[http.ts:169](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L169)
67+
[http.ts:169](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L169)
6768

6869
___
6970

7071
### get
7172

72-
**get**<T\>(`url`, `options?`): `Promise`<[Response](http.response.md)<T\>\>
73+
**get**<`T`\>(`url`, `options?`): `Promise`<[`Response`](http.response.md)<`T`\>\>
7374

7475
Makes a GET request.
7576

@@ -84,23 +85,23 @@ Makes a GET request.
8485
| Name | Type | Description |
8586
| :------ | :------ | :------ |
8687
| `url` | `string` | The request URL. |
87-
| `options?` | [RequestOptions](../modules/http.md#requestoptions) | The request options. |
88+
| `options?` | [`RequestOptions`](../modules/http.md#requestoptions) | The request options. |
8889

8990
#### Returns
9091

91-
`Promise`<[Response](http.response.md)<T\>\>
92+
`Promise`<[`Response`](http.response.md)<`T`\>\>
9293

9394
A promise resolving to the response.
9495

9596
#### Defined in
9697

97-
[http.ts:227](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L227)
98+
[http.ts:227](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L227)
9899

99100
___
100101

101102
### patch
102103

103-
**patch**<T\>(`url`, `options?`): `Promise`<[Response](http.response.md)<T\>\>
104+
**patch**<`T`\>(`url`, `options?`): `Promise`<[`Response`](http.response.md)<`T`\>\>
104105

105106
Makes a PATCH request.
106107

@@ -115,23 +116,23 @@ Makes a PATCH request.
115116
| Name | Type | Description |
116117
| :------ | :------ | :------ |
117118
| `url` | `string` | The request URL. |
118-
| `options?` | [RequestOptions](../modules/http.md#requestoptions) | The request options. |
119+
| `options?` | [`RequestOptions`](../modules/http.md#requestoptions) | The request options. |
119120

120121
#### Returns
121122

122-
`Promise`<[Response](http.response.md)<T\>\>
123+
`Promise`<[`Response`](http.response.md)<`T`\>\>
123124

124125
A promise resolving to the response.
125126

126127
#### Defined in
127128

128-
[http.ts:284](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L284)
129+
[http.ts:284](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L284)
129130

130131
___
131132

132133
### post
133134

134-
**post**<T\>(`url`, `body?`, `options?`): `Promise`<[Response](http.response.md)<T\>\>
135+
**post**<`T`\>(`url`, `body?`, `options?`): `Promise`<[`Response`](http.response.md)<`T`\>\>
135136

136137
Makes a POST request.
137138

@@ -146,24 +147,24 @@ Makes a POST request.
146147
| Name | Type | Description |
147148
| :------ | :------ | :------ |
148149
| `url` | `string` | The request URL. |
149-
| `body?` | [Body](http.body.md) | The body of the request. |
150-
| `options?` | [RequestOptions](../modules/http.md#requestoptions) | The request options. |
150+
| `body?` | [`Body`](http.body.md) | The body of the request. |
151+
| `options?` | [`RequestOptions`](../modules/http.md#requestoptions) | The request options. |
151152

152153
#### Returns
153154

154-
`Promise`<[Response](http.response.md)<T\>\>
155+
`Promise`<[`Response`](http.response.md)<`T`\>\>
155156

156157
A promise resolving to the response.
157158

158159
#### Defined in
159160

160-
[http.ts:243](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L243)
161+
[http.ts:243](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L243)
161162

162163
___
163164

164165
### put
165166

166-
**put**<T\>(`url`, `body?`, `options?`): `Promise`<[Response](http.response.md)<T\>\>
167+
**put**<`T`\>(`url`, `body?`, `options?`): `Promise`<[`Response`](http.response.md)<`T`\>\>
167168

168169
Makes a PUT request.
169170

@@ -178,24 +179,24 @@ Makes a PUT request.
178179
| Name | Type | Description |
179180
| :------ | :------ | :------ |
180181
| `url` | `string` | The request URL. |
181-
| `body?` | [Body](http.body.md) | The body of the request. |
182-
| `options?` | [RequestOptions](../modules/http.md#requestoptions) | Request options. |
182+
| `body?` | [`Body`](http.body.md) | The body of the request. |
183+
| `options?` | [`RequestOptions`](../modules/http.md#requestoptions) | Request options. |
183184

184185
#### Returns
185186

186-
`Promise`<[Response](http.response.md)<T\>\>
187+
`Promise`<[`Response`](http.response.md)<`T`\>\>
187188

188189
A promise resolving to the response.
189190

190191
#### Defined in
191192

192-
[http.ts:264](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L264)
193+
[http.ts:264](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L264)
193194

194195
___
195196

196197
### request
197198

198-
**request**<T\>(`options`): `Promise`<[Response](http.response.md)<T\>\>
199+
**request**<`T`\>(`options`): `Promise`<[`Response`](http.response.md)<`T`\>\>
199200

200201
Makes an HTTP request.
201202

@@ -209,14 +210,14 @@ Makes an HTTP request.
209210

210211
| Name | Type | Description |
211212
| :------ | :------ | :------ |
212-
| `options` | [HttpOptions](../interfaces/http.httpoptions.md) | The request options. |
213+
| `options` | [`HttpOptions`](../interfaces/http.httpoptions.md) | The request options. |
213214

214215
#### Returns
215216

216-
`Promise`<[Response](http.response.md)<T\>\>
217+
`Promise`<[`Response`](http.response.md)<`T`\>\>
217218

218219
A promise resolving to the response.
219220

220221
#### Defined in
221222

222-
[http.ts:185](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L185)
223+
[http.ts:185](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L185)

docs/en/api/js/classes/http.response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ The response data.
2727

2828
#### Defined in
2929

30-
[http.ts:145](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L145)
30+
[http.ts:145](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L145)
3131

3232
___
3333

3434
### headers
3535

36-
**headers**: `Record`<string, string\>
36+
**headers**: `Record`<`string`, `string`\>
3737

3838
The response headers.
3939

4040
#### Defined in
4141

42-
[http.ts:143](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L143)
42+
[http.ts:143](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L143)
4343

4444
___
4545

@@ -51,7 +51,7 @@ A boolean indicating whether the response was successful (status in the range 20
5151

5252
#### Defined in
5353

54-
[http.ts:141](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L141)
54+
[http.ts:141](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L141)
5555

5656
___
5757

@@ -63,7 +63,7 @@ The response status code.
6363

6464
#### Defined in
6565

66-
[http.ts:139](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L139)
66+
[http.ts:139](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L139)
6767

6868
___
6969

@@ -75,4 +75,4 @@ The request URL.
7575

7676
#### Defined in
7777

78-
[http.ts:137](https://github.com/tauri-apps/tauri/blob/01d4ada/tooling/api/src/http.ts#L137)
78+
[http.ts:137](https://github.com/tauri-apps/tauri/blob/710a4f9/tooling/api/src/http.ts#L137)

0 commit comments

Comments
 (0)