<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Andrey,<br>
      <br>
      You can place the unescaped string into a variable (e.g. "$var"),
      then use the {s.escape.user} transformation.<br>
      e.g.:<br>
          $var(query) = "username=john
      smith&amp;password=hard,to#guess";<br>
          xlog("after: \"$(var(query){s.escape.user})\"\n");<br>
      <br>
          rest_get(<a class="moz-txt-link-rfc2396E" href="http://localhost/?$(var(query){s.escape.user})">"http://localhost/?$(var(query){s.escape.user})"</a>,
      ...);<br>
      <br>
      <br>
      (output)<br>
      after: "username=john%20smith&amp;password=hard,to%23guess"<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 15.09.2015 23:41, Andrey Vorobiev
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPSK6ngStQO6jSAvSsyMr8JqO9+uAhEH=WSXRSvRMq0KqK1qwQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>I try to use REST_CLIENT (OpenSIPS version 1.11) module in
          order perform HTTP GET request with params in URL query part.
          Some of parameters may contain space characters and need to be
          encoded according to <a moz-do-not-send="true"
            href="http://www.w3schools.com/tags/ref_urlencode.asp">http://www.w3schools.com/tags/ref_urlencode.asp</a>.
          It seems that REST_CLIENT module doesn't encode specified URL.
          So what function or script transformation should I use in
          order to encode HTTP query params values?</div>
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">Best regards.</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>