An openFrameworks addon for custom HTTP clients and servers.
This is the second development release. The web socket examples have been removed and users are encouraged to use the https://github.com/bakercp/ofxJSONRPC examples instead. They are much more useful.
- Clients work best with up-to-date CA Certificate bundles. A fairly recent example is included in the ofxHTTP client examples. For up-to-date certificates (or if you just want to generate your own for security reasons), check out this page for more info: http://curl.haxx.se/docs/caextract.html
- Certificate bundles are managed by ofxSSLManager.
If your server serves up files that are downloaded by the browser rather than displayed, make sure you have a mime.types file defined in your data folder like this https://github.com/bakercp/ofxHTTP/tree/master/example_basic_file_server/bin/data/media
All web servers can be run from the cloud. To run the examples, download openFrameworks onto the server. Usually you will download a Linux64 build and will do this over ssh while connected to your web host. Then build the core library according to the linux tutorials. Then make sure that your security settings ("Security Groups" on Amazon EC2) allow incoming connections on the your chosen server ports (the default is 8080). So, for port 8080, you would allow inbound connections from 8080 0.0.0.0/0
. Then launch the server with make && make run
to build and run it the server. It is up to you to figure out the best way to enable the server at system startup and keep the server running if there are any crashes. Enjoy!
To get started, generate the example project files using the openFrameworks Project Generator.
API documentation can be found here.
The stable
branch of this repository is meant to be compatible with the openFrameworks stable branch, which corresponds to the latest official openFrameworks release.
The master
branch of this repository is meant to be compatible with the openFrameworks master branch.
Some past openFrameworks releases are supported via tagged versions, but only stable
and master
branches are actively supported.
- https://github.com/bakercp/ofxIO
- https://github.com/bakercp/ofxMediaType
- https://github.com/bakercp/ofxSSLManager
- https://github.com/bakercp/ofxNetworkUtils
Some examples may require:
This project uses Semantic Versioning, although strict adherence will only come into effect at version 1.0.0.
See LICENSE.md
.
Pull Requests are always welcome, so if you make any improvements please feel free to float them back upstream :)
- Fork this repository.
- Create your feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create new Pull Request.