What is correct aproach to update topic via ajax?

there are several places where it is discussed although it didnt work for us. Appreciate precise syntax for ajax.

The documentation said that it should be

curl -X PUT -d topic_id=14 -d title="This is my new title" http://localhost:3000/t/14?api_key=test_d7fd0429940&api_username=test_user

Athough the Firefox shows that update load goes through /posts/{id} where {id} is not topic id and also form data contains post[raw].
Please advice correct syntax for that. Many thanks.

What do you mean that it didn’t work? Did you get any error code/message? What else have you tried?