Giter Club home page Giter Club logo

fortran-curl's Introduction

fortran-curl

A collection of ISO C binding interfaces to libcurl โ‰ฅ 8.7 for Fortran 2008. The library has been tested with GNU Fortran 13 and Intel oneAPI 2024. See COVERAGE for an overview of bound procedures.

For a user-friendly, high-level HTTP library based on these bindings, see http-client.

Build Instructions

Install libcurl with development headers. On FreeBSD, run:

# pkg install ftp/curl

On Debian, instead:

# apt-get install libcurl4 libcurl4-openssl-dev

Clone the repository, then run make to build and install the interfaces to /opt:

$ git clone --depth 1 https://github.com/interkosmos/fortran-curl
$ cd fortran-curl/
$ make
$ make install PREFIX=/opt

You can override the default compilers by passing the CC and FC arguments, for example:

$ make CC=icx FC=ifx

On Linux, you may have to change the prefix to /usr:

$ make PREFIX=/usr

Link your Fortran application against /opt/lib/libfortran-curl.a -lcurl.

Examples

Examples are provided in directory examples/:

  • dict queries a DICT server on TCP port 2628.
  • download fetches a remote file.
  • getinfo prints request-related information to console.
  • gopher prints the contents of a remote Gopher map file.
  • http makes an HTTP GET request.
  • imap examines the INBOX of an IMAP mailbox (SSL).
  • mqtt posts a message to an MQTT topic.
  • multi makes multiple HTTP requests at once.
  • post makes an HTTP POST request.
  • smtp sends an e-mail via SMTP (SSL).
  • url demonstrates the URL API.
  • version outputs cURL version information.

Build an example with:

$ make <name>

Build all by running make examples.

Fortran Package Manager

This project supports the Fortran Package Manager (FPM). To build the project with FPM, run:

$ fpm build --profile release

The example programs are available with the fpm run --example command.

You can add fortran-curl to your fpm.toml with:

[dependencies]
fortran-curl = { git = "https://github.com/interkosmos/fortran-curl.git" }

Contribute

For smaller changes:

  1. Fork this repository from GitHub.
  2. Create a branch off master.
  3. Commit your changes.
  4. Send a pull request.

For larger changes:

  1. Join the Discourse Group.
  2. Discuss your proposal on the Group.
  3. When consensus is reached, implement it as described above.

Licence

ISC

fortran-curl's People

Contributors

14ngiestas avatar awvwgk avatar interkosmos avatar perazz avatar rajkumardongre avatar

Watchers

 avatar  avatar

Forkers

skphy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.