# http-request-to-url

> Get url of an http client request

Latest version **1.1.0** (published 2021-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install http-request-to-url
pnpm add http-request-to-url
yarn add http-request-to-url
bun add http-request-to-url
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-05-07 |
| First published | 2019-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stephen Belanger |
| Maintainers | qard, alanstorm |
| Keywords | http, request, url, convert |

## Links

- npm: https://www.npmjs.com/package/http-request-to-url
- Repository: https://github.com/Qard/http-request-to-url
- Homepage: https://github.com/Qard/http-request-to-url#readme
- Issues: https://github.com/Qard/http-request-to-url/issues
- npm.io page: https://npm.io/package/http-request-to-url

## Dependencies (2)

- [await-event](https://npm.io/package/await-event.md) ^2.1.0
- [socket-location](https://npm.io/package/socket-location.md) ^1.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-05-07
- 1.0.0 — 2019-10-23

## README

# http-request-to-url

Take any [`http.ClientRequest`](https://nodejs.org/api/http.html#http_class_http_clientrequest) and resolve with the url it is requesting.

## Install

```sh
npm install http-request-to-url
```

## Usage

```js
const httpRequestToUrl = require('http-request-to-url')
const http = require('http')

const url = 'http://123.231.312.123:1234/hello?name=world'
const client = http.request(url, res => res.resume())
client.end()

const location = await httpRequestToUrl(client)
console.log(location) // http://123.231.312.123:1234/hello?name=world
```

---

### Copyright (c) 2019 Stephen Belanger

#### Licensed under MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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