VB.Net to VB 6 HTTP code conversion
The following is a sample VB Net HTTP GET request and response.
GET /DEMOWebServices2.8/Service.asmx/PlaceSingleOrder?UserID=string&PWD=string&Pair=string&Expiry=string&BuySell=string&Amount=string&Rate=string&OrderBasis=string HTTP/1.1
Host: api.efxnow.com
I THINK I COMPLETELY UNDERSTAND THE ABOVE. I KNOW HOW TO RE-ARRANGE THIS for VB 6 I.E.
Dim ID as string: ID="Pough"
WebBrowser1.Navigate "http://www.api.efxnow.com/DEMOWebServices2.8/Service.asmx/PlaceSingleOrder?METHOD=get?UserID=ID& etc
I presume that I have to provide place holders to receive each of the following, for example as:
Dim Success as Boolean
How do I recode the following in VB 6?
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8 <<< WHAT DO I DO WITH THIS???
Content-Length: length <<< WHAT DO I DO WITH THIS???
<?xml version="1.0" encoding="utf-8"?> <<< WHAT DO I DO WITH THIS???
<objPlaceOrderResponse xmlns="https://api.efxnow.com/webservices2.3">
<Success>boolean</Success>
<ErrorDescription>string</ErrorDescription>
<ErrorNumber>int</ErrorNumber>
<CustomerOrderReference>int</CustomerOrderReference>
<OrderConfirmation>string</OrderConfirmation>
</objPlaceOrderResponse>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /DEMOWebServices2.8/Service.asmx/PlaceSingleOrder HTTP/1.1
Host: api.efxnow.com
Content-Type: application/x-www-form-urlencoded <<<< WHAT DO I DO WITH THIS???
Content-Length: length
UserID=string&PWD=string&Pair=string&Expiry=string&BuySell=string&Amount=string&Rate=string&OrderBasis=string
I presume this will do the trick.
WebBrowser1.Navigate http://www.api.efxnow.com/DEMOWebServices2.8/Service.asmx/PlaceSingleOrder?METHOD=post?UserID=string& etc
Once You give an answer to the above, I should be able to convert the below VB.Net to VB 6
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<objPlaceOrderResponse xmlns="https://api.efxnow.com/webservices2.3">
<Success>boolean</Success>
<ErrorDescription>string</ErrorDescription>
<ErrorNumber>int</ErrorNumber>
<CustomerOrderReference>int</CustomerOrderReference>
<OrderConfirmation>string</OrderConfirmation>
</objPlaceOrderResponse>
:WAVE:

