Results 1 to 10 of 19

Thread: HttpPostRequest Parameters

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default HttpPostRequest Parameters

    Hello guys, i'm trying to consume a service that needs some parameters(3 strings and a XML file), but i'm failing to pass the parameters by http request, what i know is that ws is not a soap(there is not a wsdl) and is not a rest ws, a normal http ws i guess?

    I was successful with postman doing this way:
    Click image for larger version. 

Name:	postman.JPG 
Views:	98 
Size:	56.3 KB 
ID:	12513

    with vdf i'm at this point now:
            Object oWebButtonNFSe is a cWebButton
                Set piColumnSpan to 0
                Set psCaption to "NFS-E"
                Object oHttpNFSe is a cHttpTransfer
                    Set psRemoteHost to ''
                    Set pbShowErrorDialog to True 
                    Property String psAllData
                    Procedure OnDataReceived String sContentType String sData
                        String sAll            
                        Get psAllData to sAll
                        Set psAllData to (sAll + sData)             
                Procedure OnClick              
                    Handle hoHttp hoXml hoSentXml hoRcvdXml
                    String sSentXml sRcvdXml
                    Boolean bOk
                    Integer iCode       
                    Get AddHeader of oHttpNFSe "Content-type" "multipart/form-data" to bOk
                    Get HttpPostRequest  of oHttpNFSe "datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1" "C:\GroupErp_trunk\teste.xml" True to sRcvdXml
                    Get ResponseStatusCode of oHttpNFSe to iCode                
                    Get psAllData of oHttpNFSe to sRcvdXml                               
    I connect and I get a return with a custom error because i'm failing to pass the right parameters (3 strings and a xml), how can i do my post request with parameters like i do in postman?

    Last edited by Salvadori; 18-Jan-2019 at 06:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts