JS. Send PostRequest from Browser Console

first, request get with http://yoururl to exchange headers, then request post
await fetch(
    "http://yoururl",
    {
        method: "POST",
        headers: { "content-type": "application/json", "origin": "same-origin" },
        body: JSON.stringify({
            filter: {
                 ...fields
            },
            pagination: {
                ...fields
            },
            order: [
                ...objs
            ],
        }),
    },
)
This entry was posted in Без рубрики. Bookmark the permalink.