@@ -19907,9 +19907,16 @@ export interface APIRequestContext {
1990719907 */
1990819908 delete<T = any>(url: string, options?: {
1990919909 /**
19910- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
19911- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
19912- * header will be set to `application/octet-stream` if not explicitly set.
19910+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
19911+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
19912+ *
19913+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
19914+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
19915+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
19916+ *
19917+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
19918+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
19919+ * header defaults to `application/octet-stream` if not explicitly set.
1991319920 */
1991419921 data?: string|Buffer|Serializable;
1991519922
@@ -20049,9 +20056,16 @@ export interface APIRequestContext {
2004920056 */
2005020057 fetch<T = any>(urlOrRequest: string|Request, options?: {
2005120058 /**
20052- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20053- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20054- * header will be set to `application/octet-stream` if not explicitly set.
20059+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20060+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20061+ *
20062+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20063+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20064+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20065+ *
20066+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20067+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20068+ * header defaults to `application/octet-stream` if not explicitly set.
2005520069 */
2005620070 data?: string|Buffer|Serializable;
2005720071
@@ -20178,9 +20192,16 @@ export interface APIRequestContext {
2017820192 */
2017920193 get<T = any>(url: string, options?: {
2018020194 /**
20181- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20182- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20183- * header will be set to `application/octet-stream` if not explicitly set.
20195+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20196+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20197+ *
20198+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20199+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20200+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20201+ *
20202+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20203+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20204+ * header defaults to `application/octet-stream` if not explicitly set.
2018420205 */
2018520206 data?: string|Buffer|Serializable;
2018620207
@@ -20275,9 +20296,16 @@ export interface APIRequestContext {
2027520296 */
2027620297 head<T = any>(url: string, options?: {
2027720298 /**
20278- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20279- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20280- * header will be set to `application/octet-stream` if not explicitly set.
20299+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20300+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20301+ *
20302+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20303+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20304+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20305+ *
20306+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20307+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20308+ * header defaults to `application/octet-stream` if not explicitly set.
2028120309 */
2028220310 data?: string|Buffer|Serializable;
2028320311
@@ -20372,9 +20400,16 @@ export interface APIRequestContext {
2037220400 */
2037320401 patch<T = any>(url: string, options?: {
2037420402 /**
20375- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20376- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20377- * header will be set to `application/octet-stream` if not explicitly set.
20403+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20404+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20405+ *
20406+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20407+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20408+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20409+ *
20410+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20411+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20412+ * header defaults to `application/octet-stream` if not explicitly set.
2037820413 */
2037920414 data?: string|Buffer|Serializable;
2038020415
@@ -20511,9 +20546,16 @@ export interface APIRequestContext {
2051120546 */
2051220547 post<T = any>(url: string, options?: {
2051320548 /**
20514- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20515- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20516- * header will be set to `application/octet-stream` if not explicitly set.
20549+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20550+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20551+ *
20552+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20553+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20554+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20555+ *
20556+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20557+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20558+ * header defaults to `application/octet-stream` if not explicitly set.
2051720559 */
2051820560 data?: string|Buffer|Serializable;
2051920561
@@ -20608,9 +20650,16 @@ export interface APIRequestContext {
2060820650 */
2060920651 put<T = any>(url: string, options?: {
2061020652 /**
20611- * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20612- * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20613- * header will be set to `application/octet-stream` if not explicitly set.
20653+ * Allows to set post data of the request. If the data parameter is an object other than a [Buffer], it will be
20654+ * serialized to JSON and the `content-type` header will be set to `application/json` if not explicitly set.
20655+ *
20656+ * If the data parameter is a string and the explicitly set `content-type` is `application/json` (case-insensitive,
20657+ * with optional parameters such as `charset=utf-8`), the string is sent as is if it parses as JSON. Otherwise, it is
20658+ * JSON-encoded as a string, including quotes and escaping. Strings with other content types are sent as is.
20659+ *
20660+ * Pass a [Buffer], such as `Buffer.from(body, 'utf8')`, to send exact bytes without JSON encoding, for example to
20661+ * send deliberately malformed JSON or a body used to compute a signature. For strings and buffers, the `content-type`
20662+ * header defaults to `application/octet-stream` if not explicitly set.
2061420663 */
2061520664 data?: string|Buffer|Serializable;
2061620665
0 commit comments