2

I have tried use inject to get param URL request like below

http://api.com?param1=test&param2=test2

I try to get param2 value :

var full_url = request.path;
var param2 = full_url.searchParams.get('param2');

but i can't get fullpath of URL i got only

http://api.com

Thanks

Sidara KEO
  • 1,693
  • 1
  • 14
  • 34

1 Answers1

2

You'll want to look at request.query

Try accessing request.query.param2 instead.

var full_url = request.path;
var param2 = request.query.param2;
Emdee82
  • 86
  • 4