# mocksome-client

> # NodeJS client for Mocksome, Mocking Server

Latest version **1.0.2** (published 2019-09-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install mocksome-client
pnpm add mocksome-client
yarn add mocksome-client
bun add mocksome-client
```

## 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.2 |
| Published | 2019-09-29 |
| First published | 2019-09-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | garethdown44 |

## Links

- npm: https://www.npmjs.com/package/mocksome-client
- npm.io page: https://npm.io/package/mocksome-client

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.88.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.4

## Recent versions

- 1.0.2 (latest) — 2019-09-29
- 1.0.1 — 2019-09-29
- 1.0.0 — 2019-09-29

## README

# PRE-RELEASE - NOT READY FOR PUBLIC CONSUMPTION YET!!

# NodeJS client for Mocksome, Mocking Server

## To Install

```
npm install mocksome-client
```

## Simple example

```js
const MockServerClient = require('mocksome-client');
const { path } = require('mocksome-client/queries');
const responses = require('mocksome-client/responses');

const client = new MockServerClient('http://localhost:8080');

const run = async () => {
  await client.expectation()
              .with(path('/somepath'))
              .response(responses.json.ok({ hello: 'goodbye' }))
              .create();
}

run();

```

Will return:

```sh
curl http://localhost:8080/somepath

{"hello":"goodbye"}

```

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