wrecked

Utilities and helpers for Hapi's Wreck library

Usage no npm install needed!

<script type="module">
  import wrecked from 'https://cdn.skypack.dev/wrecked';
</script>

README

Wreckage

Utilities and helpers for Hapi's Wreck library

Table of Contents

Overview

Wreck is an awesome library, and I always found myself wrapping the callbacks or building helpers around it. This library is a simple wrapper with some utilitarian helpers geared towards JSON geared APIs.

Installation

$ npm install wreckage --save

API

.get(uri, [options])

.post(uri, payload, [options])

.put(uri, payload, [options])

.patch(uri, payload, [options])

.delete(uri, payload, [options])

.create(configuration)

GET

.get(uri, [options])

Performs a GET request

Parameters

POST

.post(uri, payload, [options])

Performs a POST request

PUT

.put(uri, payload, [options])

Performs a PUT request

PATCH

.patch(uri, payload, [options])

Performs a PATCH request

DELETE

.delete(uri, payload, [options])

Performs a DELETE request

CREATE Instance

.create(configuration)

Roadmap

  • 100% code coverage
  • Complete documentation