# u2r

> url to request info

Latest version **0.1.3** (published 2011-10-17) · 0 weekly downloads

## Install

```sh
npm install u2r
pnpm add u2r
yarn add u2r
bun add u2r
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2011-10-17 |
| First published | 2011-10-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | SHIN Suzuki |
| Maintainers | shinout |

## Links

- npm: https://www.npmjs.com/package/u2r
- Repository: https://github.com/shinout/u2r
- Issues: https://github.com/shinout/u2r/issues
- npm.io page: https://npm.io/package/u2r

## Recent versions

- 0.1.3 (latest) — 2011-10-17
- 0.1.2 — 2011-10-17
- 0.1.1 — 2011-10-17

## README

[node.js] make an option object for "http(s).request" from url.
===
### features ###
> OK, node-request is really easy to use, but I wanted only the simplest function to get
options object to pass to http(s)Client from url.

### installation ###
    git clone git://github.com/shinout/u2r.git

    OR

    npm install u2r

### usage ###

    var u2r = require('u2r');
    var options = u2r('nodejs.org', {}); // second argument is optional.
    var protocol = require(options.protocol);
    var req = require('http').request(option, function(res) {
      res.on('data', function(d) {
        // do something
      });
    });
    req.end();

### specific options ###
 - protocol : http or https
 - body     : if method != "GET", querystring of options.data is set. options.data is passed by u2r(url, here)

 - all other options are compatible with the one http(s)Clients specify.

---
_Source: https://npm.io/package/u2r · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
