
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@azure/core-client
Advanced tools
This library is primarily intended to be used in code generated by AutoRest and autorest.typescript.
See our support policy for more details.
This package is primarily used in generated code and not meant to be consumed directly by end users.
This is the common base class for generated clients. It provides the methods sendOperationRequest and sendRequest.
sendRequest simply makes an HTTP request using a Pipeline (see @azure/core-rest-pipeline for details.)
sendOperationRequest is used by generated code to make a request using an OperationSpec and OperationArguments. An OperationSpec is a translation of request requirements from the OpenAPI/Swagger file that describes the service.
This method is used to create a Pipeline instance that is customized with extra policies that perform serialization and deserialization. The bulk of the work is in converting requests into the right HTTP message that a service expects and then converting the HTTP response payload into the response shape described by the service's OpenAPI specification file.
Mappers are used to encode and decode data into HTTP headers and bodies. They describe all request and response fields. They are referenced by OperationSpecs.
The method createSerializer creates a Serializer that is used to do the bulk of the work transforming data when making a request or processing a response. Given a corpus of Mappers and the appropriate OperationSpec it can manufacture an HTTP request object from a user provided input or convert an HTTP response object into a user-friendly form.
You can build and run the tests locally by executing npm run test. Explore the test folder to see advanced usage and behavior of the public classes.
Learn more about AutoRest and the autorest.typescript extension for generating a compatible client on top of this package.
If you run into issues while using this library, please feel free to file an issue.
If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.
Axios is a popular HTTP client for the browser and node.js. While it provides features for making HTTP requests and handling responses, it lacks the Azure-specific integrations and authentication protocols that @azure/core-client offers.
node-fetch is a lightweight module that brings window.fetch to Node.js. Similar to axios, it allows for making HTTP requests but does not include the Azure-specific features or the extensive HTTP pipeline customization options available in @azure/core-client.
Request is a simplified HTTP request client for Node.js, but it has been deprecated. While it was widely used for making HTTP requests, it does not offer the Azure service integrations or the authentication and pipeline customization capabilities of @azure/core-client.
FAQs
Core library for interfacing with AutoRest generated code
The npm package @azure/core-client receives a total of 5,215,537 weekly downloads. As such, @azure/core-client popularity was classified as popular.
We found that @azure/core-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.