1

Can anyone provide an example of how one would use the (pre-defined) function

Function HttpPost( ByVal strURL As String
                 , ByVal strHeaders As String
                 , ByVal strOptional As String
                 , ByVal bAuthenticate As Logical
                 , strContentType As String
                 , ErrorMsg As String) As CString

in MapBasic?

My POST message needs to send 2 parameters, e.g. findthis and bbox, to a php script sitting on our server which will use the parameters in an SQL query and then returns json-formatted results.

All I've been able to find is sample code within my MapBasic installation folder, however this only uses the HttpGET function and no examples of HttpPOST.

I have not found documentation.

I have posted on MapInfo-L as well where I was able to get a response with HttpGET but then not any further.

I have not yet emailed Pitney Bowes support.

Note: need to do this in 32bit MapInfo (i.e. up to v15), the application I need this for hasn't been converted to 64bit yet

  • 2
    Have you considered building this part of your appliation into .a NET assembly and calling this from MapBasic instead? – Peter Horsbøll Møller Apr 27 '17 at 20:22
  • @PeterHorsbøllMøller In short - no. I'd have to work out how to do that which is beyond the scope of this project so if possible I'd prefer to stick with MapBasic and use the tools provided. Not sure if relevant but I need to do this in a 32bit MapBasic application – Alex Apr 28 '17 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.