# Récupérer post.raw ne fonctionne qu'immédiatement après la création du post

**URL:** <https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267>\
**Category:** Development\
**Created:** [Avril 16, 2019, 11:17 UTC](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267 "2019-04-16T23:17:27Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![paresy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paresy/32/96471_2.png) [@paresy](https://meta.discourse.org/u/paresy)\
**Post date:** [Février 9, 2021, 10:05 UTC](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267/7 "2021-02-09T22:05:41Z")

</div>

Voici comment je l’ai fait pour le moment :

```plaintext
import {ajax} from "discourse/lib/ajax";

...

let post = this.findAncestorModel();
ajax(`/posts/${post.id}`, { type: "GET", cache: false }).then(
  (result) => {
    console.log(result.raw);
  }
);

```

Extrait de : [discourse-checklist/assets/javascripts/discourse/initializers/checklist.js.es6 at a94022393c1fd290e492688041896d4392129052 · discourse/discourse-checklist · GitHub](https://github.com/discourse/discourse-checklist/blob/a94022393c1fd290e492688041896d4392129052/assets/javascripts/discourse/initializers/checklist.js.es6#L39)

---

_[View the full topic](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267)._
