What’s the simplest way to call Http POST url using Delphi?

前端 未结 3 1312
迷失自我
迷失自我 2020-12-01 01:53

Inspired by the question What’s the simplest way to call Http GET url using Delphi? I really would like to see a sample of how to use POST. Preferably to receive XML from th

3条回答
  •  一生所求
    2020-12-01 02:38

    Again, Synapse TCP/IP library to the rescue. Use the HTTPSEND routine HTTPPostURL.

    function HttpPostURL(const URL, URLData: string; const Data: TStream): Boolean;
    

    Your URL would be the resource to post too, the URLDATA would be the form data, and your XML results would come back as a stream in DATA.

提交回复
热议问题