You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@azure/core-rest-pipeline

Package Overview
Dependencies
Maintainers
2
Versions
415
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.19.1
latest
npm
Version published
Maintainers
2
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

azure

FAQs

Package last updated on 06 Mar 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