function createJsonPayload(payload) {
    return {
        method: "POST",
        headers: {
            "content-type": "application/json",
            connection: "keep-alive",
        },
        body: str(payload),
    };
}
/**
 * Turns a payload into an options object that can be passed to a `fetch` call
 * by setting the necessary headers and method. May only be called for payloads
 * `P` that let `requiresFormDataUpload(P)` return `false`.
 *
 * @param payload The payload to wrap
 */
Turns a payload into an options object that can be passed to a `fetch` call
by setting the necessary headers and method.

@param payload The payload to wrap
Turns a payload into an options object that can be passed to a ` fetch ` call by setting the necessary headers and method . @param payload The payload to wrap
function createJsonPayload(payload) {
    return {
        method: "POST",
        headers: {
            "content-type": "application/json",
            connection: "keep-alive",
        },
        body: str(payload),
    };
}
function createJsonPayload ( payload ) { return { method : "POST" , headers : { "content-type" : "application/json" , connection : "keep-alive" , } , body : str ( payload ) , } ; }
Turns a payload into an options object that can be passed to a `fetch` call
 by setting the necessary headers and method.
Turns a payload into an options object that can be passed to a ` fetch ` call by setting the necessary headers and method .