Current time: 09-23-2019, 02:52 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues submitting urls via API
06-08-2011, 07:19 AM (This post was last modified: 06-08-2011 10:38 AM by pmeenan.)
Post: #1
Issues submitting urls via API
I'm having issues passing in a url to the http API when the url contains '&'.

What should i use in place of the & in order to pass this in the querystring?

For example:

http://www.webpagetest.org/runtest.php?url=http://www.samsclub.com/sams/shop/category.jsp?categoryId=1175\&navAction=jump\&iid=Header|All_Products|Cameras%20and%20Camcorders&location=Dulles_IE8&runs=3&fvonly=1&video=1&f=xml

Doesn't work. We've tried & for the url parameters, but this still doesn't work.

Any ideas?
Sorry - the \& in the previous email was another attempt at this that didn't work. This is the example I meant to paste:

http://www.webpagetest.org/runtest.php?u...eo=1&f=xml
Find all posts by this user
Quote this message in a reply
06-08-2011, 10:40 AM (This post was last modified: 06-08-2011 10:41 AM by pmeenan.)
Post: #2
RE: Issues submitting urls via API
You need to URLEncode the query parameter. Here's a good online encoder: http://meyerweb.com/eric/tools/dencoder/ but realistically, whatever language you are using to automate should have a built-in urlencode() function that will do it for you (individually for each query parameter, though the url is usually the one that causes issues).

Here is what it looks like encoded: http://www.webpagetest.org/runtest.php?u...lt;key> (make sure to insert your actual API key and please don't post them :-) )
Visit this user's website Find all posts by this user
Quote this message in a reply
06-08-2011, 03:12 PM
Post: #3
RE: Issues submitting urls via API
Great - thanks Pat!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)