1.1.7 • Published 5 years ago

twopi-network-utils v1.1.7

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

twopicode-network-utils


##Instructions

import { requestFactory, GET, POST, POST_FILE, PUT, DELETE, PATCH } from 'twopicode-network-utils'

const get = requestFactory(GET)
const post = requestFactory(POST)
const post_file = requestFactory(POST_FILE)
const put = requestFactory(PUT)
const delete = requestFactory(DELETE)
const patch = requestFactory(PATCH)


get('http://example.com/api').then(resp => {
	console.log(resp)
})

You can optionally pass a function to the factory that triggers a notification. The function takes a single string - the message to be printed.

For any more information you'll have to read the source, sorry!

1.1.7

5 years ago

1.1.5

5 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago