There are different ways to make an HTTP request with a custom body as text using JavaScript, below are the examples using the fetch and axios libraries.
index.tsx277 chars15 linesindex.tsx256 chars13 linesIn both examples, we set the Content-Type header to text/plain to indicate that the request body is a plain text.
gistlibby LogSnag