# fetch-file

> Download from an http server to a local file.

Latest version **1.0.1** (published 2013-04-27) · BSD license · 0 weekly downloads

## Install

```sh
npm install fetch-file
pnpm add fetch-file
yarn add fetch-file
bun add fetch-file
```

## 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.0.1 |
| Published | 2013-04-27 |
| First published | 2013-04-27 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | forbeslindesay |

## Links

- npm: https://www.npmjs.com/package/fetch-file
- Repository: https://github.com/ForbesLindesay/fetch-file
- npm.io page: https://npm.io/package/fetch-file

## Dependencies (4)

- [once](https://npm.io/package/once.md) ~1.1.1
- [mkdirp](https://npm.io/package/mkdirp.md) ~0.3.5
- [request](https://npm.io/package/request.md) ~2.20.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) 1.2

## Recent versions

- 1.0.1 (latest) — 2013-04-27
- 1.0.0 — 2013-04-27

## README

# Fetch File

Download from an http server to a local file.

[![Build Status](https://travis-ci.org/ForbesLindesay/fetch-file.png?branch=master)](https://travis-ci.org/ForbesLindesay/fetch-file)
[![Dependency Status](https://gemnasium.com/ForbesLindesay/fetch-file.png)](https://gemnasium.com/ForbesLindesay/fetch-file)

## Installation

    $ npm install fetch-file

## API

### fetch(remote, local, [options,] cb)

Download from `remote` to `local`.

`remote` is an options object to be passed to [request](https://github.com/mikeal/request#requestoptions-callback).  This includes `uri`, `qs`, `method`, `headers` etc...

`local` is the path to a local file.  Its directory will be created using mkdirp if it does not already exist.

Options:

 - `mode` The mode to create files with (default: 0666)

## License

BSD

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