> I need to construct a document that will send this type of info:
> 
> GET /webapp/ServerSide/Receipt/Verification?Merch_Id=2600490000003
> &Trans_Id=142124&Request_Type=RECEIPT HTTP/1.0
> Host: merch.server.com:443
> Content-Type: application/x-www-form-urlencoded
> 
> The Merch_Id and Trans_Id will always be different, but the 
> rest of the information should be the same everytime... 
> 
> I'm trying to figure out the right way to use a CFHTTP tage 
> to send these things... I *assume* that it would start out 
> looking something like:
> 
> <cfhttp
>   url = "http:///webapp/PayNet/Receipt/pgReceiptVerification?
>      Merchant_Id=2600490000003&PayNet_Transaction_Id=142124&
>      Request_Type=RECEIPT"
> > 
> 
> But, I'm not sure how to send the Host, Content and HTTP/1.0 
> information... Or how to get the Variables into the the URL 
> string... 

It's very easy to get the variables into the URL:

<cfset merch_id = "2600490000003">
<cfset trans_id = "142124">

<cfhttp
url="https://merch.server.com/webapp/ServerSide/Receipt/Verification?Merch_I
d=#merch_id#&Trans_Id=#trans_id#&Request_Type=RECEIPT"></cfhttp>

The "HTTP/1.0" header information will automatically be sent.

I don't think that CFHTTP automatically sends a Host header, though.
Typically, to send additional headers, you'd use CFHTTPPARAM to set the
appropriate CGI variables. However, this requires sending a POST request
rather than a GET request (one of the very silly limitations of CFHTTP, if I
recall correctly). You might not actually need the Host header, though -
servers handling HTTPS can't use host headers to differentiate between
incoming requests, I don't think - at least, you can't do that in IIS.

As for the Content-type header, the value you've got there is what you use
to send typical form data to the server. You shouldn't need that header at
all for a GET request, since there's no request body for which to specify a
MIME type.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to