DEV Community

Minimal API in c

Pierre Bouillon on March 19, 2019

Hi ! I recently started to explore the possibilities of creating my own API and so far, it is pretty much simple in Python and C#; that's why I wa...
Collapse
 
grantstromgren profile image
Grant Stromgren

I ended up going with a C# API in one of my projects, more so out of it's ease of authentication/authorization with Active Directory.

I found the .NET Web API framework really easy to use, but as Meghan mentioned, nothing is too "minimal" around here.

Collapse
 
fquinner profile image
fquinner

Does it need to use socket? Even for C programming, writing an API using sockets can soon become non-portable and painful. I'd suggest using something like mongoose for C or Poco if you can stretch to C++ (the "other" poco if you're coming from C# ;)). The poco project has a hello world style web app example right on it's home page.

Collapse
 
pbouillon profile image
Pierre Bouillon

I would absolutely love to. Unfortunately it seems that "try it the way we teach it" instead of "do it in the most elegant way or with the most relevant tools" is not a very common practice in CS here 😭

Collapse
 
pbouillon profile image
Pierre Bouillon

Thank you so much !

I will build my researches around this, thank you for your time !!

Collapse
 
nektro profile image
Meghan (she/her)

Nothing in C is minimalist.

Collapse
 
pbouillon profile image
Pierre Bouillon

True ahah

Collapse
 
pbouillon profile image
Pierre Bouillon

I will give it a look, thanks !

Collapse
 
joruch profile image
Joris

This is maybe a little of topic. But Ms build a really powerful rest framework in cpp. Maybe you can draw some inspiration from there