question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi @kensoh

How can I open an URL with dynamic data?

Example:

https://www.google.be/search?q=tagUI

Flow

data_keyword = "tagUI";

https://www.google.be/search?q='+data_keyword+'

ComplainsERROR - [LINE x] invalid URL https://www.google.be/search?q='+data_keyword+'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
thim81commented, Aug 1, 2017

I solved it like this but this feels very dirty, so perhaps I’m missing a better way

https://github.com/

//api_config.header[0] = 'Header1: value1';
api http://demo3796957.mockable.io/test
echo api_result
echo 'Link - ' + api_json.link

link = api_json.link.replace('https://github.com/','');
echo link

{
  https://github.com/'+link+'
}
0reactions
kensohcommented, Aug 4, 2017

@thim81 I’ve updated readme doc with a number of improvements with reference to few of the questions you raised. Also, made a commit in master with following comment. So that dynamic URLs can be used out of the box without having to specify { and } block. Removed URL validation for dynamically formed URLs in order to reduce chance of triggering false error. Thanks for your inputs!

Before this commit, URLs containing variables have to be explicitly set
in { and } block in order to retain the casper context for variables.
With this commit, that is done automatically.

So the lines below will now work. Also, url validation is only done for
raw text url in order not to trigger error for dynamically formed URLs.

link = “abc.com”;
https://'+link+'
Read more comments on GitHub >

github_iconTop Results From Across the Web

q-upload dynamic url | Quasar Framework Community
i want to change the url of q-upload based on some process done by user in the page, but when i change the...
Read more >
Q: Dynamic URL · Issue #37 · aisingapore/TagUI
Hi @kensoh How can I open an URL with dynamic data? Example: https://www.google.be/search?q=tagUI Flow data_keyword = "tagUI"; ...
Read more >
Navigation to Page by Dynamic URL
How to perform the navigation to the page by dynamic/parameterized URL. Given. Let's use Google search page as example. For example we need...
Read more >
Handle Dynamic URLs with Auto Resolve Feature
PX Auto resolve feature allows you to use dynamic URLs when the target URL is dynamic in nature or has multiple URLs. PX...
Read more >
Dynamic url and Adding a the title to the end of the page url
This is called URL rewriting, essentially you have a handler that interprets the URL coming in. It does not mean it is 'exact'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found