title: How to rewrite function used POST metod to use also GET method in LoadRunner?
body: <p>For POST method I have this piece of code in LR (it is working):</p>
  
  <pre><code>web_custom_request(transname,
  URL,
  "Method=POST",
  "TargetFrame=",
  "Mode=HTML",
  "Resource=0",
  "Referer=",
  EncodingType,
  lr_eval_string(request),
  LAST);
  </code></pre>
  
  <p>This piece of code is placed in a separated .c file and called from user_init using a long sequence of related functions working with XML, arrays, strings data.</p>
  
  <p>URL for POST requests has structure in user_init like this:
      URL=https://{HOST}/aaa/bbb/page.asp</p>
  
  <p>Also user_init contains this piece of code:</p>
  
  <pre><code>web_custom_request("Login_page",
  "URL=http://{HOST}/api/04_00/Pr_NAME.asp",
  "Method=POST",
  "RecContentType=text/xml",
  "Body="
  "&lt;?xml version=\"1.0\"?&gt;"
  "&lt;Request    xmlns=\"http://api.rr.com/Pr_NAME\"&gt;\r\n"
  "  &lt;MethodRequest&gt;\r\n"
  "    &lt;AuthenticateUserRequest appID=\"value_appID\" password=\"value_password\"&gt;\r\n"
  "      &lt;User&gt;\r\n"
  "        &lt;LoginName&gt;value_LoginName&lt;/LoginName&gt;\r\n"
  "      &lt;/User&gt;\r\n"
  "    &lt;/AuthenticateUserRequest&gt;\r\n"
  "  &lt;/MethodRequest&gt;\r\n"
  "&lt;/Request&gt;\r\n", 
  LAST);
  </code></pre>
  
  <p>I need something additional to this code, that will allow to send both POST and GET requests to web-service. Now it sends only POST requests.</p>
  
  <p>There are some questions:</p>
  
  <p>1) How should I change this function to get the possibility to send both types of requests, POST and GET? What strings should I add to this function?</p>
  
  <p>2) How should I change the URL for GET requests?</p>
  
  <p>I think, it should be something like this:</p>
  
  <pre><code>URL=https://{HOST}/aaa/bbb/page.asp?param1=value1&amp;param2=value2...&amp;paramN=valueN
  </code></pre>
  
  <p>But what parameters should I add as param1, param2, ..., paramN?</p>
  
  <p>How to define, how many and what parameters I need put in this URL construction?</p>
  
  <p>Should I write this structure:</p>
  
  <pre><code>URL=http://{HOST}/api/04_00/Pr_NAME.asp?appID=value_appID&amp;password=value_password&amp;LoginName=value_LoginName
  </code></pre>
  
  <p>or shouldn't I add LoginName=value_LoginName in this structure?</p>
  
  <p>3) How can I combine both 2 methods POST and GET in 1 function, to have the possibility to send both types of requests, POST and GET, from LR?</p>
  
  <p>Please, could you help me? I'm a novice in data transferring in LR using POST and GET methods and functions.</p>