@xtdev/bff-request
Advanced tools
Comparing version 0.0.3 to 0.0.5
@@ -124,2 +124,5 @@ import axios from 'axios'; | ||
var resuqest = new BFFRequest('locals'); | ||
resuqest.get('sadasd', {}); | ||
export { BFFRequest as default }; |
import BFFRequest from './src/request'; | ||
const resuqest = new BFFRequest('locals') | ||
resuqest.get('sadasd',{},); | ||
export default BFFRequest |
{ | ||
"name": "@xtdev/bff-request", | ||
"version": "0.0.3", | ||
"version": "0.0.5", | ||
"description": "a http request for xiantan BFF", | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
"build": "rollup -c", | ||
"release": "yarn version --patch && yarn build && npm publish --access public", | ||
"release": "yarn version --patch && yarn build && npm publish --access public --registry=https://registry.npmjs.org/", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -19,0 +19,0 @@ }, |
@@ -57,3 +57,3 @@ import axios, { AxiosInstance, Method } from 'axios'; | ||
*/ | ||
post(url: string, params: any, arg: any) { | ||
post(url: string, params?: any, arg?: any) { | ||
return this.protoMethod('post', url, params, arg); | ||
@@ -68,3 +68,3 @@ } | ||
*/ | ||
get(url: string, params: any, arg: any) { | ||
get(url: string, params?: any, arg?: any) { | ||
return this.protoMethod('get', url, params, arg); | ||
@@ -79,3 +79,3 @@ } | ||
*/ | ||
put(url: string, params: any, arg: any) { | ||
put(url: string, params?: any, arg?: any) { | ||
return this.protoMethod('put', url, params, arg); | ||
@@ -91,3 +91,3 @@ } | ||
*/ | ||
protoMethod(method: Method, url: string, params: any, arg: any) { | ||
protoMethod(method: Method, url: string, params?: any, arg?: any) { | ||
const opt = { | ||
@@ -94,0 +94,0 @@ method, |
8096
224