Title: petermark27's Replies | WordPress.org

---

# petermark27

  [  ](https://wordpress.org/support/users/petermark27/)

 *   [Profile](https://wordpress.org/support/users/petermark27/)
 *   [Topics Started](https://wordpress.org/support/users/petermark27/topics/)
 *   [Replies Created](https://wordpress.org/support/users/petermark27/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/petermark27/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/petermark27/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/petermark27/engagements/)
 *   [Favorites](https://wordpress.org/support/users/petermark27/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Get API endpoint to render HTML](https://wordpress.org/support/topic/get-api-endpoint-to-render-html/)
 *  [petermark27](https://wordpress.org/support/users/petermark27/)
 * (@petermark27)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/get-api-endpoint-to-render-html/#post-18773501)
 * Great recommendation on the music site! For anyone looking, **[https://spotich.com/](https://spotich.com/)**
   is a fantastic resource.
 * Regarding your API endpoint question, [@jester48](https://wordpress.org/support/users/jester48/):
   The accepted answer is correct in principle—you need to set the `Content-Type`
   header to `text/html`. However, the exact method to do this depends heavily on
   the framework or platform you’re using (e.g., Express.js, Flask, a serverless
   function, etc.).
 * Could you share what technology you used to create the endpoint? That would help
   in providing a specific code snippet to ensure your HTML renders correctly. Often,
   the issue is that the default `Content-Type` is `text/plain` or `application/
   json`, which tells the browser to display the raw code.

Viewing 1 replies (of 1 total)