Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@azure/ms-rest-js
Advanced tools
Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest
@azure/ms-rest-js is a package provided by Microsoft Azure that offers a set of tools for making HTTP requests and handling responses, particularly for Azure services. It includes features for authentication, serialization, and deserialization of data, and provides a foundation for building SDKs for Azure services.
HTTP Client
The HTTP Client feature allows you to send HTTP requests and handle responses. This is useful for interacting with RESTful APIs.
const { HttpClient } = require('@azure/ms-rest-js');
const client = new HttpClient();
client.sendRequest({ url: 'https://example.com', method: 'GET' }).then(response => {
console.log(response.bodyAsText);
});
Authentication
The Authentication feature provides support for various authentication mechanisms, such as token-based authentication, which is essential for securely accessing Azure services.
const { TokenCredentials } = require('@azure/ms-rest-js');
const credentials = new TokenCredentials('your-access-token');
const client = new HttpClient(credentials);
client.sendRequest({ url: 'https://example.com', method: 'GET' }).then(response => {
console.log(response.bodyAsText);
});
Serialization and Deserialization
The Serialization and Deserialization feature allows you to convert JavaScript objects to and from JSON, which is useful for sending and receiving data in a structured format.
const { Serializer } = require('@azure/ms-rest-js');
const serializer = new Serializer();
const model = { name: 'example', age: 30 };
const serializedModel = serializer.serialize({ type: { name: 'Composite', className: 'Model', modelProperties: { name: { serializedName: 'name', type: { name: 'String' } }, age: { serializedName: 'age', type: { name: 'Number' } } } } }, model);
console.log(serializedModel);
Axios is a popular HTTP client for making requests to APIs. It is similar to the HTTP Client feature of @azure/ms-rest-js but does not include built-in support for Azure-specific authentication or serialization.
Request is another HTTP client library for Node.js. It provides a simple way to make HTTP requests but lacks the Azure-specific features such as authentication and serialization found in @azure/ms-rest-js.
Node-fetch is a lightweight module that brings window.fetch to Node.js. It is similar to the HTTP Client feature of @azure/ms-rest-js but does not include Azure-specific functionalities like authentication and serialization.
Runtime for isomorphic javascript libraries (that work in the browser and node.js environemnt) generated via Autorest.
npm install
node samples/node-sample.js
You can find an explanation of how this repository's code works by going to our architecture overview.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest
We found that @azure/ms-rest-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.