New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@izhank216/content-types-fetch-pull

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@izhank216/content-types-fetch-pull

A faster, clean fetch library

latest
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

Usage (ESM)

import { fetchPull, encode, decode } from '@izhank216/content-types-fetch-pull';

async function main() {
  // GET request
  const todo = await fetchPull('https://jsonplaceholder.typicode.com/todos/1');
  console.log(todo);

  // POST request with JSON
  const newTodo = await fetchPull('https://jsonplaceholder.typicode.com/todos', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ title: 'Test', completed: false }),
  });
  console.log(newTodo);

  // Encode/decode
  const encoded = encode('Hello World');
  const decoded = decode(encoded);
  console.log(decoded);
}

main();

Usage (CJS)

const { fetchPull, encode, decode } = require('@izhank216/content-types-fetch-pull');

(async () => {
  // GET request
  const todo = await fetchPull('https://jsonplaceholder.typicode.com/todos/1');
  console.log(todo);

  // POST request with JSON
  const newTodo = await fetchPull('https://jsonplaceholder.typicode.com/todos', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ title: 'Test', completed: false }),
  });
  console.log(newTodo);

  // Encode/decode
  const encoded = encode('Hello World');
  const decoded = decode(encoded);
  console.log(decoded);
})();

Usage (Browser)

Include the library from jsDelivr:

<script src="https://cdn.jsdelivr.net/npm/@izhank216/content-types-fetch-pull@1.0.9/dist/content-types-fetch-pull.browser.js"></script>
<script>
  // Access via the UMD global object
  const { fetchPull, encode, decode } = ContentTypesFetchPull;

  async function main() {
    // GET request
    const todo = await fetchPull('https://jsonplaceholder.typicode.com/todos/1');
    console.log(todo);

    // POST request with JSON
    const newTodo = await fetchPull('https://jsonplaceholder.typicode.com/todos', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ title: 'Test', completed: false }),
    });
    console.log(newTodo);

    // Encode/decode
    const encoded = encode('Hello World');
    const decoded = decode(encoded);
    console.log(decoded);
  }

  main();
</script>

FAQs

Package last updated on 21 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts