Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/core/payload.ts>createJsonPayload

The Telegram Bot Framework.
Very Popular
Latest
function createJsonPayload
import { createJsonPayload } from "https://deno.land/x/grammy@v1.31.3/core/payload.ts";

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.

Parameters

payload: Record<string, unknown>

The payload to wrap