2 Replies Latest reply on Aug 5, 2009 12:06 AM by Richard_Abbott

    passing url parameter

    rockstar888

      Hi,

       

      I would like to pass a url parameter, with the following format,  to a get method.

           http://myserver/send?param-id=1234@5678

       

      I was able to do it using the HTTPService send(parameter) but the characters "-" and "@" are changed. I want to send the parameter as is, can anyone teach me how?

       

      Thanks in advance..

        • 1. Re: passing url parameter
          Richard_Abbott Level 3

          rockstar888,

          for a GET, you can only use things which are permitted characters in a URL string. Hence some characters won't work just as they are. Now, we all know some browsers are very accommodating with things like this (eg a space character should be sent as %20 but if typing in a URL you can usually get away with it in a browser), but you have to be more strict in this situation. One way is to have some encode/decode stuff at each end. Another (if you are going to use the result simply as a URL at the other end) is just to let the URL encoding go on its way without problems. Another is to use POST rather than GET, since POST variables are passed like entries in an HTML form rather than a querystring, so you have more flexibility. To do this you just use the method property of HTTPService.

          Richard

          1 person found this helpful
          • 2. Re: passing url parameter
            rockstar888 Level 1

            Thanks, Richard!