IHP 1.3 is out now!

Using IHP with an existing REST API

runeksvendsen

Hi there,

I have developed the backend for a web app as an HTTP API (using Servant + Warp), and I would like to use IHP to develop the web part against this HTTP API.

As far as I can see, IHP starts at the database schema level, and generates its own HTTP API from this. However, I would like to tell IHP about my HTTP API and then develop a web app against this. Is this possible currently? If so, how?

Thank you in advance :)

marc PRO

Hey,

IHP is usually used as a full stack framework. So you'll get the most value out of IHP by also using IHP for your backend. Redoing the backend in IHP is likely faster than working on all the problems that arise when interfacing with an API backend.

If you don't want to do this, you can just use the database schema editor so that IHP generates the models for you, and then fetch the data from the backend using HTTP calls. Check this recipe for making http calls: https://ihp.digitallyinduced.com/Guide/recipes.html#making-an-http-request