我需要通过curl制作文件上传,有人可以告诉我如何修改我在这里找到的代码:
Private Sub Befehl0_Click()
TargetURL = "https://services.mobile.de/upload-api/upload/"
Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1")
HTTPReq.Option(4) = 13056 '
HTTPReq.Open "POST", TargetURL, False
HTTPReq.SetCredentials "user", "password", 0
HTTPReq.setRequestHeader "Content-Type", "application/data-binary"
HTTPReq.send ("kraveto.zip")
MsgBox (HTTPReq.responseText)
End Sub
如果我使用它,我会收到错误的请求回复。服务器的提供者我希望我用这个命令连接:
curl -v -u User:Pw -X POST --data-binary @helau.zip
https://services.mobile.de/upload-api/upload/foobar-2016-02-09_11-11-11.zip
有人可以帮忙吗? Thx提前马里奥