Answer the question
In order to leave comments, you need to log in
How to generate JSON from caught POST?
Good day. I caught a POST request from the site, please tell me how to make it in JavaScript (to send from the plugin).
await fetch("https://web.totalcoin.io/services/otc/api/v1/offers/update", {
"credentials": "include",
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0",
"Accept": "application/json, text/plain, */*",
"Accept-Language": "ru",
"Authorization": "e34hbGciCtcE",
"Content-ID-UUID": "6546-c456-456-a355-....",
"Content-Type": "application/json;charset=utf-8",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin"
},
"referrer": "https://web.totalcoin.io/",
"body": "{\"id\":\"b5b33db7-535c-4cdc-bd53-....\",\"paymentMethod\":{\"id\":732,\"name\":\"Tinkoff Bank\",\"currencyId\":\"USD\",\"currencyDisplayNameShort\":\"$\",\"icon\":\"https://img.totalcoin.io/upload/_pmc/176.png\",\"bestPriceSell\":43916.81,\"bestPriceBuy\":36647.32},\"price\":43500,\"limitMin\":50,\"limitMax\":3000,\"active\":false,\"user\":{\"id\":\"ef8be720-e12e-452b-a67c-....\",\"nickname\":\"DanilV\",\"confirmedCount\":14,\"refusedCount\":5,\"firstDealDate\":1616687528952,\"medianResponseTime\":0,\"okReviewCount\":11,\"badReviewCount\":0,\"textReviewCount\":4,\"totalValueTrade\":0.05888727,\"tradeVolume\":{\"BTC\":0.05888727},\"currency\":{\"id\":\"RUB\",\"displayNameShort\":\"р.\"},\"tradeEnabled\":true,\"currentUser\":true,\"isNickChanged\":true,\"timeoutAccept\":5,\"timeoutTransferConfirm\":30,\"timeoutOpenDispute\":15,\"userBlockedTimes\":1,\"verified\":false,\"proTrader\":false,\"isFavoriteUser\":false,\"favoriteUser\":false,\"nickChanged\":true},\"cryptocurrency\":\"BTC\",\"type\":\"BUY\",\"terms\":\"Баксы рубли\",\"autoLimit\":false,\"fixedPrice\":43500,\"partnerLimitType\":\"NO_LIMIT\",\"partnerLimitDealsTotal\":\"LIMIT_0\",\"partnerLimitTradeVolume\":\"LIMIT_0\",\"partnerLimitPercent\":0,\"feePercents\":null}",
"method": "POST",
"mode": "cors"
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question