[Csnd] Web request plugin opcodes

I have created some web request plugin opcodes, which allow GET and POST requests to be made from Csound at init time and k-rate, using libcurl. These can be used with the JSON opcodes I wrote, to allow for interacting with web services. May be of use to someone - my main motivation for these is to store/obtain state information on a server, eg presets etc.

git repository and info:
     csound-curl - Web request opcodes providing GET, POST and URLEncode functionality

plugin opcodes overview page including the JSON opcodes mentioned:
     https://plugins.csound.1bpm.net/

all the best
Richard

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

I’d like to see a variation of this built-in to csound one day (e.g. import “https://my-csound-udo-file.com”)
json being built-in would be even of higher importance (for later not necessarily csound7), I didn’t know you’ve made json opcode, nice <3

Hi!

Very cool! This can be super useful in some context, like interactive works getting data from some web hosted live statistics or otherwise.

Thanks for this!
tarmo

Kontakt Richard Knight (<richard@1bpm.net>) kirjutas kuupäeval K, 10. aprill 2024 kell 01:35:

I have created some web request plugin opcodes, which allow GET and POST
requests to be made from Csound at init time and k-rate, using libcurl.
These can be used with the JSON opcodes I wrote, to allow for
interacting with web services. May be of use to someone - my main
motivation for these is to store/obtain state information on a server,
eg presets etc.

git repository and info:
https://git.1bpm.net/csound-curl/about/

plugin opcodes overview page including the JSON opcodes mentioned:
https://plugins.csound.1bpm.net/

all the best
Richard

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

#include works with any URL that CURL can handle - if Csound has been built with CURL - I think that does what you are mentioning in the first line there… It does have a brief mention on the #include man page

If the version of Csound is built with the CURL library the filename in an #include statement can be an URL, recognised by including the substring “://” in the name. This will include text via protocols such as http, https, and ftp.

Yes json built-in would be nice. It’s a bit of an awkward one to handle in a non object based form / without associative arrays and such, so there may be some things in the future of Csound that make it easier to manipulate json.

Thanks! Let me know if you have any feedback/ideas if and when you have a go with it