Answer Question
0
0

Dobrý den,
mám problém s připojení VBA k API pomocí metody POST.
V dokumentaci je toto:

Můj kod je následující:
Public Sub test()
Dim xmlhttp As Object
Set xmlhttp = CreateObject(“MSXML2.ServerXMLHTTP.6.0”)
Dim myDom As Object
Set myDom = CreateObject(“MSXML2.DOMDocument.6.0”)

Url = “http://www.rzp.cz/cgi-bin/aps_cacheWEB.sh”
myDom.async = False
myXMLstr = “96300”

xmlhttp.Open “POST”, Url, False

xmlhttp.setRequestHeader “enctype”, “multipart/form-data”
xmlhttp.setRequestHeader “name”, “frmdata”
SendString = “&type=hidden&name=VSS_SERV&value=ZVWSBJXML”
SendString = SendString & “&type=file&name=”
SendString = SendString & myXMLstr
‘SendString = SendString & “type=submit&name=x&value=ODESLI”

xmlhttp.send SendString

response = xmlhttp.responseText
MsgBox response
MsgBox SendString
End Sub

Vrací mi to chybu 403.

Můžete mi, prosím, poradit?

Děkuji

Marked as spam
Odeslal Vanitas
Otázka položena 15.4.2020 11:03
175 views

Odešlete svou odpověď

Attach YouTube/Vimeo clip putting the URL in brackets: [https://youtu.be/Zkdf3kaso]