Home > database >  Using Visual Foxpro submitted in the form of POST JSON to HTTPS web pages
Using Visual Foxpro submitted in the form of POST JSON to HTTPS web pages

Time:09-23


I want to have a JSON content, POST to provide API page,
And then receive the server returns a JSON,,,
Use VF implementation?

https://open.leshui365.com/resources/invoice/
I want to make a client with FOXPRO,
Just want to know it needs a few parameters, how to POST to this web page, specify the

Need to use JSON format to POST these four parameters:
InvoiceCode invoiceNumber, billTime, token
The
https://open.leshui365.com/api/invoiceInfoForCom
Web page, and then receives the returned JSON,,

Hope everybody to give directions,,,,,,,,,, thank you!!!!!!!!!!!

CodePudding user response:

There are a great god know not? Once again thank humbly!!!!!
Or refers to the road, where there is a tutorial, the younger brother himself to digest,,,,

CodePudding user response:

Find the papaya myfll, punctuated with calls to the post request

CodePudding user response:

Oh, you can,

CodePudding user response:

The FUNCTION isbnSearch
LPARAMETERS isbn

Url="https://api.douban.com/v2/book/isbn/" + isbn
OXml=NewObject (" Microsoft. XmlHttp ")
OXml. Open (" GET ", url, f.)
OXml. The send ()

The SET PROCEDURE TO qdfoxJSON & amp; & Enable the JSON data support
JSONStart ()

ABookInfo=JSONObject (oXml. The responseText)

CBookImg=STRTRAN (aBookInfo. Images. Large, "", "") & amp; & In the string \ into ""

& & Download books cover
Set the Library To myFll
DownFile (cBookImg, \ "images" + ". JPG "+ isbn)
Set the Library To

RETURN aBookInfo

ENDFUNC

CodePudding user response:

Is a function of the example above, the development of yourself,,

CodePudding user response:


Lc_post_chr_OK="" & amp; & This is you want to send the value of the

Set the Library To (" c: \ myfll ")
Lc_return=HttpPostData (" http://api... Com/Handle. Aspx, "(lc_post_chr_OK))
Set the Library To

If Vartype (lc_return)="C"
Lc_return=STRCONV (lc_return, 11) & amp; & Back to UNICODE
MessageBox (lc_return, "sent to the server success!" )
The ELSE
MessageBox (" sent to the server failed!" )
EndIf
  •  Tags:  
  • VFP
  • Related