MCPcopy
hub / github.com/sindresorhus/got / json

Method json

source/core/options.ts:1948–1950  ·  view source on GitHub ↗

JSON request body. If the `content-type` header is not set, it will be set to `application/json`. __Important__: This option only affects the request body you send to the server. To parse the response as JSON, you must either call `.json()` on the promise or set `responseType: 'json'` in the optio

()

Source from the content-addressed store, hash-verified

1946 __Note #2__: This option is not enumerable and will not be merged with the instance defaults.
1947 */
1948 get json(): unknown {
1949 return this.#internals.json;
1950 }
1951
1952 set json(value: unknown) {
1953 if (value !== undefined) {

Callers 15

mainFunction · 0.80
runkit-example.jsFile · 0.80
http.tsFile · 0.80
echoMultipartBodyFunction · 0.80
post.tsFile · 0.80
headers.tsFile · 0.80
error.tsFile · 0.80
promise.tsFile · 0.80
hooks.tsFile · 0.80
create.tsFile · 0.80
stream.tsFile · 0.80

Calls 1

trackStateMutationFunction · 0.85

Tested by

no test coverage detected