1

How can I post the content of a TStringList or TListBox in JSON format using TIdHTTP?

Note : I need to post them in one request !

The content of the list box looks like this :

window
door
box
pin
book
lamp
tree
house
roof
..
..
.
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
K.MuS
  • 141
  • 1
  • 10

1 Answers1

0

Create the JSON data however you want (use Delphi's own JSON framework, or a 3rd party JSON library, or just write your own JSON code). Then store the JSON data in a TStream, such as TStringStream or TMemoryStream, and then pass that stream to TIdHTTP.Post().

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770