Commit Graph

10 Commits

Author SHA1 Message Date
Dmitriy Pleshevskiy 6249d0bde9 fix: try to get json data from error 2021-06-15 00:11:58 +03:00
Dmitriy Pleshevskiy beba6445a2 fix: extracting type conflicts 2020-12-23 00:03:45 +03:00
Dmitriy Pleshevskiy 79b404cd28 chore: bump version 2020-12-20 16:18:41 +03:00
Dmitriy Pleshevskiy 96c7ea554c chore: bump version 2020-12-08 10:40:55 +03:00
Dmitriy Pleshevskiy 49aac94675 fix: use window location as base url
chore: add dist folder to repo
chore(deps): add node-fetch for tests
chore: change prepare request visibility
chore: add tests for prepare request method
chore: update example

Closes #20
2020-12-08 10:35:18 +03:00
Dmitriy Pleshevskiy e812d4e077 chore: remove target folder before build 2020-11-06 05:04:44 +03:00
Dmitriy Pleshevskiy 132ae5c22c fix: filter undefined variable values
chore(tests): add tests for misc methods

Closes #14
2020-11-06 04:47:01 +03:00
Dmitriy Pleshevskiy 8c6833805b feat!(request-hook): add new request hook
This hook works only for endpoint with GET method.

* refac!(request-hook): add lazy prefix to request hook

BREAKING CHANGES: you need to rename all `useRequest` hooks to
`useLazyRequest`

* refac!(request-hook): add public request state

BREAKING CHANGES: User shouldn't see previous headers, variables and params.
It's only for hooks so it doesn't call request again. If you use these
state you should to remove it from your code.

* chore: update example

Closes #5
2020-11-05 23:26:56 +03:00
Dmitriy Pleshevskiy 243f4f77e5 feat!(client): add client fetch based
breaking!(context): client prop instead base url
refac: change axios response to client response
chore(deps): remove axios
chore: update example

Closes #2
2020-11-05 00:23:57 +03:00
Dmitriy Pleshevskiy e9c18c9fea Initial commit
feat(context): add context for request
feat(client): add hook for get memo rest client
feat(endpoint): add endpoint object for configure rest methods
feat(request): add request hook
refac(request): return cached data for same query
refac(request): remove void variables for endpoints
feat(request): add headers to request cache
2020-11-04 00:39:14 +03:00