Socket
Socket
Sign inDemoInstall

@azure/core-rest-pipeline

Package Overview
Dependencies
Maintainers
2
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-rest-pipeline

Isomorphic client library for making HTTP requests in node.js and browser.


Version published
Weekly downloads
735K
decreased by-80.34%
Maintainers
2
Weekly downloads
 
Created

What is @azure/core-rest-pipeline?

The @azure/core-rest-pipeline package provides a set of classes and functions to build and manage the HTTP pipeline for making REST requests. It is part of the Azure SDK for JavaScript and is used by other Azure SDK packages to interact with Azure services. It offers features like retry policies, logging, and request/response transformations.

What are @azure/core-rest-pipeline's main functionalities?

Creating and using a pipeline

This code demonstrates how to create a new pipeline and an HTTP client that will use this pipeline for sending requests.

const { Pipeline } = require('@azure/core-rest-pipeline');

const pipeline = Pipeline.create();
const httpClient = pipeline.createClient();

Adding policies to the pipeline

This code shows how to add a logging policy to the pipeline, which can help with debugging by logging information about the requests and responses.

const { Pipeline, logPolicy } = require('@azure/core-rest-pipeline');

const pipeline = Pipeline.create();
pipeline.addPolicy(logPolicy());

Sending a request using the pipeline

This code snippet illustrates how to send a request using the pipeline and an HTTP client. It creates a request object and then sends it, awaiting the response.

const { createPipelineRequest } = require('@azure/core-rest-pipeline');

const request = createPipelineRequest({ url: 'https://example.com' });
const response = await pipeline.sendRequest(httpClient, request);

Other packages similar to @azure/core-rest-pipeline

Keywords

FAQs

Package last updated on 02 Aug 2024

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