Can anyone tell me how I should use the resulting TJSONObject of TRestClient.PostEntity if it gets destroyed before the method returns?!

Comments

  1. It's obvious they don't unit test their code...

    ReplyDelete
  2. Could it be for a future version of Delphi, that is running on a quantum computer? ;-)

    ReplyDelete
  3. Just to make sure: this isn't supposed to be a rant about a (admittedly stupid) bug but more of a question if I did not miss something because I know that you can plug the request and response components together and that some properties are set up depending what class the owner of one of them is.

    ReplyDelete
  4. Sorry if I over stepped the mark - just having a little bit of fun. Yes, it doesn't help you but just maybe, a little smile was brought to someone's face. Again, sorry.

    ReplyDelete
  5. http://docwiki.embarcadero.com/Libraries/XE7/en/REST.Client.TCustomRESTClient.PostEntity
    Embarcadero Technologies does not currently have any additional information.
    This means it's an "undocumented" or imcomplete or buggy API.   ;-)  haha.

    ReplyDelete
  6. No REST for the wicked?  Is the destruction conditional in some way?

    ReplyDelete
  7. Lars Fosdal Nah, its creating a TRestRequest in that method and then returning LRequest.Response.JSONValue which gets destroyed along with LRequest.

    ReplyDelete

Post a Comment