Note that there are some explanatory texts on larger screens.

plurals
  1. POhttp:get adding "&" before getting
    primarykey
    data
    text
    <p>Not sure what is going on. When I perform the following code... it runs fine... but it is producing an error. If I paste the following into my browser address bar and hit it, I get one URL. If I put the same url through the KRL http:get, I get a completely different URL. </p> <p>"http://tinyurl.com/api-create.php?url=http://insideaf.blogspot.com"</p> <p>on my own in the browser I get: <a href="http://tinyurl.com/6j7qucx" rel="nofollow">http://tinyurl.com/6j7qucx</a></p> <p>when run through http:get I get: <a href="http://tinyurl.com/4fdtnoo" rel="nofollow">http://tinyurl.com/4fdtnoo</a></p> <p>The difference is that the second one, the one run through the KRL http:get hits the requested site, but it appends a "/&amp;" to the end of the request. It does this no matter what site I am on. If I am on www.google.com, it returns a tinyurl that results in www.google.com/&amp; with gives me an error. All sites that I pass to the http:get method get returned with an &amp; at the end. Here is my code, so that you can see that I am not accidentally adding it myself. </p> <p>myLocation = event:param("location");</p> <p>url2tiny = "http://tinyurl.com/api-create.php?url="+myLocation;</p> <p>tinyresponse = http:get(url2tiny);</p> <p>tinyurl = tinyurl.pick("$.content");</p> <p>If I console.log the url2tiny, it looks exactly like it should. It appears that when I pass url2tiny to http:get, it is automatically adding the &amp; to the end of it before it requests it from the tinyurl api. </p> <p>Any ideas for workarounds to this issue? It appears to be a bug in the http:get method. If I am wrong (and I hope I am), please point me in the right direction. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload