i. I am using visual studio 8 using vb.net. I am trying to make a post request that complies with the following schema, but am failing miserably.
<?xml version="1.0" encoding="UTF-8"?>
<postBetOrder xmlns="urn:betfair:games:api:v1"
marketId="2568540" round="1" currency="GBP">
<betPlace>
<bidType>BACK</bidType>
<price>2.5</price>
<size>2.50</size>
<selectionId>658440</selectionId>
</betPlace>
I am not sure what I need to do to post to make the bet.I have had many goes at posting what thought was the correct information in the correct form, using postStream = myWebRequest.Ge开发者_如何学CtRequestStream() postStream.Write(bytedata, 0, bytedata.Length) But thus far all I get is an error, premature end of file. Please can anyone help. Thanks for all contributions.
As suggested by Sonny Boy, you have neglected to include a at the end of the file.
(Community Wiki, just trying to get this question officially answered.)
<?xml version="1.0" encoding="UTF-8"?>
<postBetOrder xmlns="urn:betfair:games:api:v1"
marketId="2568540" round="1" currency="GBP">
<betPlace>
<bidType>BACK</bidType>
<price>2.5</price>
<size>2.50</size>
<selectionId>658440</selectionId>
</betPlace>
*</postBetOrder>*
This is the correct format to your example, but i need more information to give you a complete solution.
精彩评论