Commit 61319b8 1 parent 3b0c899 commit 61319b8 Copy full SHA for 61319b8
File tree 1 file changed +15
-5
lines changed
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 17
17
</p >
18
18
19
19
## Installation
20
+ ---------
20
21
21
22
``` sh
22
23
npm i --save kb-burly
23
24
```
24
25
25
- ## Usage
26
+ Usage
27
+ ---------
28
+
29
+
26
30
[ ![ Edit burly-examples-t6lzw] ( https://codesandbox.io/static/img/play-codesandbox.svg )] ( https://codesandbox.io/s/burly-examples-t6lzw )
27
- #### Basic Example :
31
+ #### Basic:
28
32
29
33
``` ts
30
34
const burly = Burly (" https://api.com/find" )
31
35
.addParam (" id" , 1234 )
32
36
.get ; // = https://api.com/find?id=1234
33
37
```
34
- #### Nested Example :
38
+ #### Nested query :
35
39
36
40
``` ts
37
41
const object = {
@@ -44,13 +48,19 @@ const burly = Burly('http://test.com')
44
48
.addQuery (' where' , object )
45
49
.get ; // = http://test.com?where=yes%3D%27no%27%26maybe%3D%27%2Ftest%2F%27
46
50
```
47
- #### Bad Parameter Example :
51
+ #### Null parameter :
48
52
``` ts
49
53
const burly = Burly (" http://bad-param.blog" )
50
54
.addParam (' bad' , null )
51
55
.get ; // = http://bad-param.blog
52
56
```
53
57
54
- ## Credits
58
+ Reference:
59
+ ----------
60
+
61
+ ###### new Burly([ baseURL] )
62
+
63
+ Credits
64
+ --------
55
65
56
66
_ Based heavily on [ url-assembler] ( https://github.com/Floby/node-url-assembler ) by Florent Jaby_
You can’t perform that action at this time.
0 commit comments