address comments

This commit is contained in:
Yury Semikhatsky 2024-04-23 15:26:25 -07:00
parent b9e9cc0a07
commit 55da536a99
3 changed files with 47 additions and 16 deletions

View file

@ -159,7 +159,10 @@ context cookies from the response. The method will automatically follow redirect
### option: APIRequestContext.delete.form = %%-csharp-fetch-option-form-%%
* since: v1.17
### option: APIRequestContext.delete.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.delete.multipart = %%-js-fetch-option-multipart-%%
* since: v1.17
### option: APIRequestContext.delete.multipart = %%-python-fetch-option-multipart-%%
* since: v1.17
### option: APIRequestContext.delete.multipart = %%-csharp-fetch-option-multipart-%%
@ -324,7 +327,10 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
### option: APIRequestContext.fetch.form = %%-csharp-fetch-option-form-%%
* since: v1.16
### option: APIRequestContext.fetch.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.fetch.multipart = %%-js-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.fetch.multipart = %%-python-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.fetch.multipart = %%-csharp-fetch-option-multipart-%%
@ -410,7 +416,10 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
### option: APIRequestContext.get.form = %%-csharp-fetch-option-form-%%
* since: v1.26
### option: APIRequestContext.get.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.get.multipart = %%-js-fetch-option-multipart-%%
* since: v1.26
### option: APIRequestContext.get.multipart = %%-python-fetch-option-multipart-%%
* since: v1.26
### option: APIRequestContext.get.multipart = %%-csharp-fetch-option-multipart-%%
@ -460,7 +469,10 @@ context cookies from the response. The method will automatically follow redirect
### option: APIRequestContext.head.form = %%-csharp-fetch-option-form-%%
* since: v1.26
### option: APIRequestContext.head.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.head.multipart = %%-js-fetch-option-multipart-%%
* since: v1.26
### option: APIRequestContext.head.multipart = %%-python-fetch-option-multipart-%%
* since: v1.26
### option: APIRequestContext.head.multipart = %%-csharp-fetch-option-multipart-%%
@ -510,7 +522,10 @@ context cookies from the response. The method will automatically follow redirect
### option: APIRequestContext.patch.form = %%-csharp-fetch-option-form-%%
* since: v1.16
### option: APIRequestContext.patch.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.patch.multipart = %%-js-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.patch.multipart = %%-python-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.patch.multipart = %%-csharp-fetch-option-multipart-%%
@ -690,7 +705,10 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
### option: APIRequestContext.post.form = %%-csharp-fetch-option-form-%%
* since: v1.16
### option: APIRequestContext.post.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.post.multipart = %%-js-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.post.multipart = %%-python-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.post.multipart = %%-csharp-fetch-option-multipart-%%
@ -740,7 +758,10 @@ context cookies from the response. The method will automatically follow redirect
### option: APIRequestContext.put.form = %%-csharp-fetch-option-form-%%
* since: v1.16
### option: APIRequestContext.put.multipart = %%-js-python-fetch-option-multipart-%%
### option: APIRequestContext.put.multipart = %%-js-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.put.multipart = %%-python-fetch-option-multipart-%%
* since: v1.16
### option: APIRequestContext.put.multipart = %%-csharp-fetch-option-multipart-%%

View file

@ -15,7 +15,7 @@ page.request().post("http://localhost/submit", RequestOptions.create().setForm(f
```
## method: FormData.append
* since: v1.43
* since: v1.44
- returns: <[FormData]>
Appends a new value onto an existing key inside a FormData object, or adds the key if it
@ -23,7 +23,7 @@ does not already exist. File values can be passed either as `Path` or as `FilePa
Multiple fields with the same name can be added.
The difference between [`method: FormData.set`] and [`method: FormData.append`] is that if the specified key already exists,
set() will overwrite all existing values with the new one, whereas append() will append
[`method: FormData.set`] will overwrite all existing values with the new one, whereas [`method: FormData.append`] will append
the new value onto the end of the existing set of values.
```java
@ -61,13 +61,13 @@ await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart =
```
### param: FormData.append.name
* since: v1.43
* since: v1.44
- `name` <[string]>
Field name.
### param: FormData.append.value
* since: v1.43
* since: v1.44
- `value` <[string]|[boolean]|[int]|[Path]|[Object]>
- `name` <[string]> File name
- `mimeType` <[string]> File type
@ -76,7 +76,7 @@ Field name.
Field value.
### param: FormData.append.value
* since: v1.43
* since: v1.44
* langs: csharp
- `value` <[string]|[boolean]|[int]|[Object]>
- `name` <[string]> File name

View file

@ -403,8 +403,8 @@ unless explicitly provided.
An instance of [FormData] can be created via [`method: APIRequestContext.createFormData`].
## js-python-fetch-option-multipart
* langs: js, python
## js-fetch-option-multipart
* langs: js
- `multipart` <[FormData]|[Object]<[string], [string]|[float]|[boolean]|[ReadStream]|[Object]>>
- `name` <[string]> File name
- `mimeType` <[string]> File type
@ -415,14 +415,24 @@ this request body. If this parameter is specified `content-type` header will be
unless explicitly provided. File values can be passed either as [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream)
or as file-like object containing file name, mime-type and its content.
## python-fetch-option-multipart
* langs: python
- `multipart` <[Object]<[string], [string]|[float]|[boolean]|[ReadStream]|[Object]>>
- `name` <[string]> File name
- `mimeType` <[string]> File type
- `buffer` <[Buffer]> File content
Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as
this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data`
unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
## csharp-fetch-option-multipart
* langs: csharp
- `multipart` <[FormData]>
Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as
this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data`
unless explicitly provided. File values can be passed either as [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream)
or as file-like object containing file name, mime-type and its content.
unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
An instance of [FormData] can be created via [`method: APIRequestContext.createFormData`].