fabriciocolombo / delphi-rest-client-api

A Delphi REST client API to consume REST services written in any programming language.
Apache License 2.0
380 stars 182 forks source link

How Put TList<T> and get TList<T> in response #5

Closed Tarvirdi closed 11 years ago

Tarvirdi commented 11 years ago

I need send (PUT) some records in TList pack and get response in TList<T'> . How Can I do?

fabriciocolombo commented 11 years ago

I added this feature after seeing your issue. Now you can call the service as a put command normally.

var
  vPeople: TList<TPerson>;
begin
  //Populate list

  RestClient.Resource('http://localhost:8080/java-rest-server/rest/person')
            .Accept(RestUtils.MediaType_Json)
            .ContentType(RestUtils.MediaType_Json)
            .Put<TList<TPerson>>(vPeople);