Skip to content

Commit 96b81b6

Browse files
authoredDec 11, 2024··
Merge pull request #2 from duffn/duffn/update-readme
Add convenience functions to README
2 parents 7da3311 + de33cc2 commit 96b81b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎README.md

+6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ List the parameters that you would like to have _remain_ in the URL. All other q
1919

2020
```
2121
import querymodifier;
22+
2223
set req.url = querymodifier.modifyparams(url=req.url, params="search,id", exclude_params=false);
24+
# Or use the convenience function, `includeparams`.
25+
set req.url = querymodifier.includeparams(url=req.url, params="search,id");
2326
2427
# Original URL: example.com/?search=name&ts=123456789&id=987654321
2528
# Modified URL: example.com/?search=name&id=987654321
@@ -31,7 +34,10 @@ List the parameters that you would like to have _removed_ from the URL. All othe
3134

3235
```
3336
import querymodifier;
37+
3438
set req.url = querymodifier.modifyparams(url=req.url, params="ts,v", exclude_params=true);
39+
# Or use the convenience function, `excludeparams`.
40+
set req.url = querymodifier.excludparams(url=req.url, params="ts,v");
3541
3642
# Original URL: example.com/?search=name&ts=123456789&v=123456789&id=987654321
3743
# Modified URL: example.com/?search=name&id=987654321

0 commit comments

Comments
 (0)
Please sign in to comment.