Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sryden/matrix

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sryden/matrix

Matrix is a Node.js module for HTTP GET and POST requests within SRYDEN products.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

SRYDEN Matrix

Matrix is a Node.js module for HTTP GET and POST requests within SRYDEN products.

Installation

Install Matrix using npm:

npm install @sryden/matrix

Usage

const Matrix = require('@sryden/matrix');
const request = Matrix();

// Example GET request
request.get({
  url: 'https://example.com',
})
  .then((response) => {
    console.log('GET response:', response);
  })
  .catch((error) => {
    console.error('GET error:', error.message);
  });

// Example POST request
request.post({
  url: 'https://example.com',
  data: { title: '1', body: '2', userId: 1 },
})
  .then((response) => {
    console.log('POST response:', response);
  })
  .catch((error) => {
    console.error('POST error:', error.message);
  });

Request

matrix(config)

Creates a new instance of the SRYDEN Matrix module.

  • config (optional): Configuration object for the Matrix instance.

get(options)

Performs an HTTP GET request.

  • options: Object with the following properties:
    • url (required): The URL for the GET request.
    • params (optional): Query parameters for the request.

post(options)

Performs an HTTP POST request.

  • options: Object with the following properties:
    • url (required): The URL for the POST request.
    • data (optional): Data to be sent in the request body.
    • config (optional): Additional configuration for the request.

FAQs

Package last updated on 03 Dec 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc