Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fetch

const fetch = require('node-fetch');

    let response = await fetch(`your url paste here`, {
      headers: {
        Authorization: `Token ${API_TOKEN}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify(payload),
      method: 'POST',
    });
    const results = await response.json();
    console.log("======> :: results", results);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fetch
ADD COMMENT
Topic
Name
3+6 =