Importing Libraries into the Web IDE

Hello everyone,
I’m currently trying to send data from a spark to a pi running emoncms via HTTP. From what I’ve gathered this means the spark core has to be a HTTP server, not client. I’ve found two libraries that would do the job:

And also:

I’ve clicked “Use Example” on the web IDE for both and get a similar error:

For the first link:

In file included from ../inc/spark_wiring.h:29:0,


                   from ../inc/application.h:29,


                   from http_parser.cpp:24:


  ../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]


   #warning  "Defaulting to Release Build"


    ^


  http_parser.cpp:24:25: fatal error: http_parser.h: No such file or directory


   #include "application.h"


                           ^


  compilation terminated.


  make: *** [http_parser.o] Error 1

For the later link:

In file included from ../inc/spark_wiring.h:29:0,


                   from ../inc/application.h:29,


                   from web_ajaxbuzzer.cpp:2:


  ../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]


   #warning  "Defaulting to Release Build"


    ^


  web_ajaxbuzzer.cpp:3:23: fatal error: WebServer.h: No such file or directory


   void setup();


                         ^


  compilation terminated.


  make: *** [web_ajaxbuzzer.o] Error 1

There is some problem in the demo .ino.
For example in the web-ajaxbuzzer.ino just change the line

#include "WebServer.h"

into

#include "WebServer/WebServer.h"

Great! That’s flashing now. Any input on the other one?
thanks for your help

I guess it’s a similar problem.
Try to add the library name as home path for the header files.

What’s the name of the lib in Web IDE?

spark-web-embd-rest-json
Thanks again

This one is a bit more tricky to solve since it would need some alterations to SparkTime.h which is not editable in Web IDE.

Tried some possible workarounds, but didn’t work out :anguished:

So it might be time to open an issue on the GitHub of the lib.
Best if you do that yourself @OddieCAT. This way the original developer can assist your direct.

Maybe @CaptainIgloo himself can join this thread to give you some hints on how to get his lib built on the Web IDE.