Maybe somebidy can help me. I'm trying using the upcoming.org API
through VB and WinHttp.WinHttpRequest.5.1. For methods that uses GET
everithing is working fine but when I'm trying to use POST for example
for vanue.add I have an error
Method not found - Check that you are using the proper Method for the
resource (i.e. GET or POST)
I tried the same parameters using cURL and everithing was working
correct. So api_key and token are correct.
My code is:
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
strUrl = "http://www.upcoming.org/services/rest/"
strPostData =
"api_key=<API_Key>&method=venue.add&token=<Token>&name=test&venueaddress=none&metro_id=332&private=1"
objHTTP.Open "POST", strURL, False
objHTTP.SetRequestHeader "content-type",
"application/x-www-form-urlencoded"
objHTTP.Option(WinHttpRequestOption_UserAgentString) = strUserAgent
objHTTP.Send strPostData
And returned xml
<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="fail">
<error msg="Method not found - Check that you are using the proper
Method for the resource (i.e. GET or POST)" />
</rsp>
Please, help me if you have any ideals. Thanks a lot.
.