title: Improve CFHTTP response time
body: <p>I have an API that logs in an account and then performs a search on items that I want to place a bid on via a CFHTTP request as follows.</p>
  
  <p>Search.cfm:</p>
  
  <pre><code>&lt;cfinclude template="logMeIn.cfm" /&gt;
  
  &lt;cfhttp url="https://utas.fut.ea.com/ut/game/fifa14/transfermarket?maxb=1800000&amp;start=0&amp;num=16&amp;type=player&amp;maskedDefId=158023" method="POST" result="Get"&gt;
      &lt;cfhttpparam type="header" name="Cache-Control" value="no-cache" /&gt;
      &lt;cfhttpparam type="header" name="Host" value="utas.fut.ea.com" /&gt;
      &lt;cfhttpparam type="header" name="Referer" value="http://cdn.easf.www.easports.com/soccer/static/flash/futFifaUltimateTeamPlugin/FifaUltimateTeam.swf" /&gt;
      &lt;cfhttpparam type="header" name="X-HTTP-Method-Override" value="GET" /&gt;
      &lt;cfhttpparam type="header" name="X-UT-PHISHING-TOKEN" value="#ListLast(Session.searchAccount40PhishingKey,'=')#" /&gt;
      &lt;cfhttpparam type="header" name="X-UT-SID" value="#Session.searchAccount40SessionKey#" /&gt;
  &lt;/cfhttp&gt;
  </code></pre>
  
  <p>logMeIn.cfm:</p>
  
  <pre><code>&lt;cfscript&gt;
      Variables.email = "XYZ@example.com";
      Variables.password = "password";
      Variables.secretAnswer = "secretAnswer";
      Session.searchAccountGamertag = "WirierJupiter11";
      Variables.doReload = 0;
      Variables.deviceView = "device=not_mobile";
  &lt;/cfscript&gt;
  
  &lt;cfhttp url="http://www.easports.com/uk/fifa/football-club/ultimate-team" method="GET" result="stage1" redirect="false"&gt;
      &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
      &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
      &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
      &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
      &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
      &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
  &lt;/cfhttp&gt;
  
  &lt;cfif StructKeyExists(Stage1.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage2URL = Stage1.ResponseHeader['Location'];
          Variables.returnedCookies = Stage1.ResponseHeader['Set-Cookie'];
          Variables.easfcWebSessionStr = Variables.returnedCookies[1];
          Variables.easfcWebSession = ListFirst(Variables.easfcWebSessionStr,";");
          Variables.hlStr = Variables.returnedCookies[2];
          Variables.hl = ListFirst(Variables.hlStr,";");
          Variables.xsrfTokenStr = Variables.returnedCookies[3];
          Variables.xsrfToken = ListFirst(Variables.xsrfTokenStr,";");
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage2URL#" method="GET" result="Stage2" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="accounts.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage2") AND StructKeyExists(Stage2.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage3URL = Stage2.ResponseHeader['Location'];
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage3URL#" method="GET" result="Stage3" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="signin.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage3") AND StructKeyExists(Stage3.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage4URL = Stage3.ResponseHeader['Location'];
          Variables.jSessionStr = Stage3.ResponseHeader['Set-Cookie'];
          Variables.jSession = ListFirst(Variables.jSessionStr,";");
      &lt;/cfscript&gt;
  
      &lt;cfhttp url="#Variables.stage4URL#" method="GET" result="Stage4" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.jSession#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="signin.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  
      &lt;cfscript&gt;
          Variables.bodyContent = "email=#Variables.email#&amp;password=#Variables.password#&amp;_rememberMe=on&amp;rememberMe=on&amp;_eventId=submit&amp;facebookAuth=";
          Variables.contentLength = Len(Variables.bodyContent);
      &lt;/cfscript&gt;
  
      &lt;cfhttp url="#Variables.stage4URL#" method="POST" result="Stage5" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Cache-Control" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Content-Length" value="#Variables.contentLength#" /&gt;
          &lt;cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.jSession#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="signin.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="#Variables.stage4URL#" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
          &lt;cfhttpparam type="body" value="#Variables.bodyContent#" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage5") AND StructKeyExists(Stage5.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage6URL = Stage5.ResponseHeader['Location'];
          Variables.returnedCookies = Stage5.ResponseHeader['Set-Cookie'];
          Variables.webunStr = Variables.returnedCookies[3];
          Variables.webun = ListFirst(Variables.webunStr,";");
          Variables.isPogoStr = Variables.returnedCookies[4];
          Variables.isPogo = ListFirst(Variables.isPogoStr,";");
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage6URL#" method="GET" result="Stage6" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Cache-Control" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="s_sivo=US%3AORIGIN%3ANONE; s_cc=true; s_ria=flash%2010%7Csilverlight%202.9; s_pv=NA%3AUS%3ASTORE%3ANONE%3ASTORE%3ANONE%3AORIGIN%3ANONE%3ALOGIN; s_nr1=1379427845791-NEW; s_sq=%5B%5BB%5D%5D; __utma=103303007.1129861060.1379427834.1379427834.1379427834.1; __utmb=103303007.1.10.1379427834; __utmc=103303007; __utmz=103303007.1379427834.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); s_ppv=85"&gt;
          &lt;cfhttpparam type="header" name="Host" value="accounts.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="#Variables.stage4URL#" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage6") AND StructKeyExists(Stage6.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage7URL = Stage6.ResponseHeader['Location'];
          Variables.returnedCookies = Stage6.ResponseHeader['Set-Cookie'];
          Variables.sidStr = Variables.returnedCookies[1];
          Variables.sid = ListFirst(Variables.sidStr,";");
          Variables.remidStr = Variables.returnedCookies[2];
          Variables.remid = ListFirst(Variables.remidStr,";");
          Variables.cookieStr = Variables.easfcWebSession &amp; "; " &amp; Variables.hl &amp; "; " &amp; Variables.xsrfToken;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage7URL#" method="GET" result="Stage7" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Cache-Control" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.cookieStr#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Pragma" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage7") AND StructKeyExists(Stage7.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage8URL = Stage7.ResponseHeader['Location'];
          Variables.easfcWebSessionStr = Stage7.ResponseHeader['Set-Cookie'];
          Variables.easfcWebSession = ListFirst(Variables.easfcWebSessionStr,";");
          Variables.cookieStr = Variables.easfcWebSession &amp; "; " &amp; Variables.hl &amp; "; " &amp; Variables.xsrfToken;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage8URL#" method="GET" result="Stage8" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Cache-Control" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.cookieStr#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Pragma" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage8") AND StructKeyExists(Stage8.ResponseHeader,"Set-Cookie")&gt;
      &lt;cfscript&gt;
          Variables.stage9URL = "http://www.easports.com/iframe/fut/?locale=en_GB&amp;baseShowoffUrl=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team%2Fshow-off&amp;guest_app_uri=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team";
          Variables.returnedCookies = Stage8.ResponseHeader['Set-Cookie'];
          Variables.deviceView = ListFirst(Variables.returnedCookies,";");
          Variables.cookieStr = Variables.cookieStr &amp; "; " &amp; Variables.deviceView;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage9URL#" method="GET" result="Stage9" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.cookieStr#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="http://www.easports.com/uk/fifa/football-club/ultimate-team" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage9") AND StructKeyExists(Stage9.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage10URL = Stage9.ResponseHeader['Location'];
          Variables.futWebStr = Stage9.ResponseHeader['Set-Cookie'];
          Variables.futWeb = ListFirst(Variables.futWebStr,";");
          Variables.cookieStr = Variables.remid &amp; "; " &amp; Variables.sid;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage10URL#" method="GET" result="Stage10" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.cookieStr#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="accounts.ea.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="http://www.easports.com/uk/fifa/football-club/ultimate-team" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage10") AND StructKeyExists(Stage10.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage11URL = Stage10.ResponseHeader['Location'];
          Variables.sidStr = Stage10.ResponseHeader['Set-Cookie'];
          Variables.sid = ListFirst(Variables.sidStr,";");
          Variables.cookieStr = Variables.futWeb &amp; "; " &amp; Variables.easfcWebSession &amp; "; " &amp; Variables.hl &amp; "; " &amp; Variables.xsrfToken &amp; "; " &amp; Variables.deviceView;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage11URL#" method="GET" result="Stage11" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Encoding" value="gzip, deflate" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Variables.cookieStr#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="http://www.easports.com/fifa/football-club/ultimate-team" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"Stage11") AND StructKeyExists(Stage11.ResponseHeader,"Location")&gt;
      &lt;cfscript&gt;
          Variables.stage12URL = Stage11.ResponseHeader['Location'];
          Variables.futWebStr = Stage11.ResponseHeader['Set-Cookie'];
          Variables.futWeb = ListFirst(Variables.futWebStr,";");
          Session.searchAccountCookie = Variables.futWeb &amp; "; " &amp; Variables.easfcWebSession &amp; "; " &amp; Variables.hl &amp; "; " &amp; Variables.xsrfToken &amp; "; " &amp; Variables.deviceView;
      &lt;/cfscript&gt;
      &lt;cfhttp url="#Variables.stage12URL#" method="GET" result="Stage12" redirect="false"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Session.searchAccountCookie#" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="http://www.easports.com/fifa/football-club/ultimate-team" /&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Session,"searchAccountCookie")&gt;
      &lt;cfscript&gt;
          Variables.data = '{ "isReadOnly": false, "sku": "FUT14WEB", "clientVersion": 1, "nuc": 1000215983198, "nucleusPersonaId": 948682854"nucleusPersonaDisplayName": "WirierJupiter11", "nucleusPersonaPlatform": "360", "locale": "en-GB", "method": "authcode", "priorityLevel":4, "identification": { "authCode": "" } }';
          Variables.dataLength = Len(Variables.data);
      &lt;/cfscript&gt;
      &lt;cfhttp url="http://www.easports.com/iframe/fut/p/ut/auth" method="POST" result="sessionIDRequest"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="application/json, text/javascript" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Content-Length" value="#Variables.dataLength#" /&gt;
          &lt;cfhttpparam type="header" name="Content-Type" value="application/json" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Session.searchAccountCookie#" /&gt;
          &lt;cfhttpparam type="header" name="Easw-Session-Data-Nucleus-ID" value="1000215983198" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Pragma" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value=" http://www.easports.com/iframe/fut/?baseShowoffUrl=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team%2Fshow-off&amp;guest_app_uri=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team&amp;locale=en_GB"&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;   
          &lt;cfhttpparam type="header" name="X-UT-Embed-Error" value="true" /&gt;
          &lt;cfhttpparam type="header" name="X-UT-Route" value="https://utas.fut.ea.com:443" /&gt;
          &lt;cfhttpparam type="header" name="X-Requested-With" value="XMLHttpRequest" /&gt;
          &lt;cfhttpparam type="body" value="#Variables.data#" /&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"sessionIDRequest") AND Variables.sessionIDRequest.FileContent NEQ "Connection Failure" AND Variables.sessionIDRequest.StatusCode NEQ "500 Internal Server Error"&gt;
      &lt;cfscript&gt;
          Variables.sessionKeyRequest = REReplace(Variables.sessionIDRequest.FileContent, "^\s*[[:word:]]*\s*\(\s*","");
          Variables.sessionKeyRequest = REReplace(Variables.sessionKeyRequest, "\s*\)\s*$", "");
          Variables.sessionInfo = DeserializeJSON(Variables.sessionKeyRequest);
          Session.searchAccountSessionKey = Variables.sessionInfo.sid;
      &lt;/cfscript&gt;
      &lt;cfhttp url="http://www.easports.com/iframe/fut/p/ut/game/fifa14/phishing/validate" method="POST" result="phishingKeyRequest"&gt;
          &lt;cfhttpparam type="header" name="Accept" value="application/json" /&gt;
          &lt;cfhttpparam type="header" name="Accept-Language" value="en-US, en;q=0.5" /&gt;
          &lt;cfhttpparam type="header" name="Connection" value="keep-alive" /&gt;
          &lt;cfhttpparam type="header" name="Content-Length" value="39" /&gt;
          &lt;cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" /&gt;
          &lt;cfhttpparam type="header" name="Cookie" value="#Session.searchAccountCookie#" /&gt;
          &lt;cfhttpparam type="header" name="Easw-Session-Data-Nucleus-ID" value="1000215983198" /&gt;
          &lt;cfhttpparam type="header" name="Host" value="www.easports.com" /&gt;
          &lt;cfhttpparam type="header" name="Pragma" value="no-cache" /&gt;
          &lt;cfhttpparam type="header" name="Referer" value="http://www.easports.com/iframe/fut/?baseShowoffUrl=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team%2Fshow-off&amp;guest_app_uri=http%3A%2F%2Fwww.easports.com%2Fuk%2Ffifa%2Ffootball-club%2Fultimate-team&amp;locale=en_GB"&gt;
          &lt;cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" /&gt;
          &lt;cfhttpparam type="header" name="X-UT-Embed-Error" value="true" /&gt;
          &lt;cfhttpparam type="header" name="X-UT-Route" value="https://utas.fut.ea.com:443" /&gt;
          &lt;cfhttpparam type="header" name="X-Requested-With" value="XMLHttpRequest" /&gt;
          &lt;cfhttpparam type="header" name="X-UT-SID" value="#Session.searchAccountSessionKey#" /&gt;
          &lt;cfhttpparam type="formField" name="answer" value="#Variables.secretAnswer#"&gt;
      &lt;/cfhttp&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;cfif StructKeyExists(Variables,"phishingKeyRequest") AND StructKeyExists(Variables.phishingKeyRequest.ResponseHeader,"Set-Cookie")&gt;    
      &lt;cfscript&gt;
          Variables.returnedCookies = phishingKeyRequest.ResponseHeader["Set-Cookie"];
          Session.searchAccountPhishingKey = ListFirst(Variables.returnedCookies,";");
          if (StructKeyExists(Variables,"easfcWebSession")) {
              Variables.cookieStr = Variables.easfcWebSession &amp; "; " &amp; Variables.hl &amp; "; " &amp; Variables.xsrfToken &amp; "; device=not_mobile; " &amp; Session.searchAccountPhishingKey;
              Session.searchAccountLoggedIn = 1;
              Session.searchAccountLoginAttempts = 0;
          } else {
              Variables.doReload = 1;
          }
      &lt;/cfscript&gt;
  &lt;cfelse&gt;
      &lt;cfset Variables.doReload = 1 /&gt;
  &lt;/cfif&gt;
  
  &lt;!--- IF RELOAD PAGE FLAG SET TO TRUE RELOAD ---&gt;
  &lt;cfif Variables.doReload EQ 1&gt;
  
      &lt;!--- RELOAD PAGE ---&gt;
      &lt;script&gt;
          location.reload();
      &lt;/script&gt;
  
  &lt;/cfif&gt;
  </code></pre>
  
  <p>The issue I'm having is that the search response is taking a few hundred milliseconds to return and this is resulting in me missing out on quite a lot of items (as there are APIs that are getting this data back faster).</p>
  
  <p>Is there a way I can increase the time it takes me to receive a response? Is there something I can amend in my code or an alternative function to CFHTTP that I could use? Or is there even another language like Ruby, Python or C# that I might be better writing the API in that can perform this sort of function faster, as at the end of the day speed is the most important factor.</p>
  
  <p>Thanks very much in advance for any advice.</p>