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. Need to fire request with client certificate This blog post contains sample code (node.js) showing how to execute an HTTP request that authenticates with client certificate instead of user/password.
If you run into issues while using this library, please feel free to file an issue. Follow the instructions of JavaScript Bundling Guide using Parcel to build and run the code in the browser.Set values of subscriptionId and token variable in samples/index.js.Set values of subscriptionId and token variable in samples/node-sample.tsĬhange directory to samples folder, compile the TypeScript code, then run the sample One easy way to get an access token is using Azure CLI To run the code, first obtain an access token to the Azure management service. The code in samples\node-sample.ts shows how to create a ServiceClient instance with a test TokenCredential implementation and use the client instance to perform a GET operation from the Azure management service endpoint for subscriptions. For more information on how to build project in this repo, please refer to the Contributing Guide. Next stepsīuild this library ( core-http). The HTTP module can create an HTTP server that listens to server ports and gives a response back to the client. ExamplesĮxamples can be found in the samples folder. With a promise-based API, using async/await is just some syntactic sugar on top of it. It offers both callback- and promise-based APIs.
You can find an explanation of how this repository's code works by going to our architecture overview. A robust HTTP library for Node.js, SuperAgent brands itself as a small, progressive, client-side HTTP request library and Node.js module with the same API, supporting many high-level HTTP client features. Here are the key points you need to remember about each: Along with Node.js, Axios has the widest compatibility among browsers. This package is primarily used in generated code and not meant to be consumed directly by end users. Each of the 3 clients I have mentioned above has its own advantages.