1.3.7 • Published 2 years ago
nax-rest-api-client v1.3.7
import {Router, BaseRouter, Permission} from 'rest-api-client'
class Post extends Router<Data>{
abstract baseUrl: string;
abstract secret: string;
encript_data = false;
encript_query = true;
configs: AxiosRequestConfig = {}
headers: AxiosRequestConfig["headers"] = {}
async request?(_options: AxiosRequestConfig): Promise<AxiosRequestConfig | void>;
async response?(_res: AxiosResponse): Promise<AxiosResponse | void>
async catchError?(err: AxiosError): Promise<void>;
constructor(){
super()
this.use(() => {}, ...)
this.use('/path', () => {}, ...)
}
}
const post = new Post
post.get('/', {...AxiosRequestConfig})
post.post('/', {...AxiosRequestConfig})
post.put('/', {...AxiosRequestConfig})
post.del('/', {...AxiosRequestConfig})
post.patch('/', {...AxiosRequestConfig})
post.options('/', {...AxiosRequestConfig})
post.options('/', {...AxiosRequestConfig})
post.abort(method, path)
post.isFatching(method, path)
/// Permission
// props - /types/Permission.ts
Permission.create(path: string, props)
Permission.get(path: string)
Permission.delete(path: string)
Permission.getAll()
class Base extends BaseRouter{}
const BR = new Base
1.3.7
2 years ago
1.2.8
2 years ago
1.3.6
2 years ago
1.2.7
2 years ago
1.3.5
2 years ago
1.2.6
2 years ago
1.2.5
2 years ago
1.3.3
2 years ago
1.2.4
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.2.9
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago