Endpoints which write public content are much harder to test. What's the best way to test the new comments functionality without having to post to real threads?

I have seen the Charles web proxy suggested, but my trial has run out, and if I remember correctly, it was a bit tricky setting it up so that HTTPS endpoints could be used.

If the Stack Apps team is fine with it, I would be happy for other developers to write to this very thread.

1 Answer 1


This is what preview is for.

Every write method takes a parameter called preview (the test console defaults it to true for testing purposes). When it's explicitly set to true, the method goes through all the validation it otherwise would but stops just short of actually committing the data. Preview calls also don't consume any of a user's write quota.

It's basically built for helping you test that you're calling the API correctly without actually causing any side effects.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .