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

@azure/core-rest-pipeline

Package Overview
Dependencies
Maintainers
2
Versions
316
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.

  • 1.17.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4.1M
decreased by-10%
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 12 Sep 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