Web Connection
HTTP post from VFP 8.0 to an action in an MVC controller
Gravatar is a globally recognized avatar based on your email address. HTTP post from VFP 8.0 to an action in an MVC controller
  Matthew Beech
  All
  Aug 6, 2018 @ 09:21am

lcdata = ""

tnSize = 0

oHTTP = CREATEOBJECT("wwHTTP")

This URL works fine as an aspx webapi**

M_ThisURL = "https://www.myp11d.com/webapp/p11dorganiser/UploadFile.aspx?serialNumber=" + "p11ddemomb" + "&userName=" + "myUserName" + "&ActivationHash=" + "myActivationHash"

We want to move this to the following URL which points to an action in an MVC controller but it fails**

M_ThisURL = "https://www.myp11d.com/p11d/p11dorganiser/UploadFile?serialNumber=" + "p11ddemomb" + "&userName=" + "myUserName" + "&ActivationHash=" + "myActivationHash"

loURL = oHTTP.internetcrackURL(M_ThisURL)

oHTTP.nHTTPConnectType = 0

lnResult = oHTTP.HTTPconnect(loURL.cserver)

M_ThisZIPFile = "C:\source\P11D\databackup\20141110\20141110135637.ZIP"

oHTTP.nHttpPostMode = 2

oHTTP.AddPostKey()

oHTTP.AddPostKey("zip", M_ThisZIPFile, .T.)

lnResult = oHTTP.HTTPGetEx(loURL.cPath + loURL.cQueryString,@lcData,@tnSize)

? lcdata

? oHTTP.cERRORMSG

? loURL.cPath

I understand you offer paid support how do we signup for a few hours to resolve this issue ?

Many Thanks awaiting your response

Gravatar is a globally recognized avatar based on your email address. re: HTTP post from VFP 8.0 to an action in an MVC controller
  Rick Strahl
  Matthew Beech
  Aug 7, 2018 @ 10:34am

Can you please repost this (or fix this message) with proper formatting using the formatting options on the toolbar?

Thanks,

+++ Rick ---

© 1996-2024