Home

Awesome

<p align="center"> <a href="http://kitura.io/"> <img src="https://raw.githubusercontent.com/Kitura/Kitura/master/Sources/Kitura/resources/kitura-bird.svg?sanitize=true" height="100" alt="Kitura"> </a> </p> <p align="center"> <a href="https://kitura.github.io/Kitura-net/index.html"> <img src="https://img.shields.io/badge/apidoc-KituraNet-1FBCE4.svg?style=flat" alt="APIDoc"> </a> <a href="https://travis-ci.org/Kitura/Kitura-net"> <img src="https://travis-ci.org/Kitura/Kitura-net.svg?branch=master" alt="Build Status - Master"> </a> <img src="https://img.shields.io/badge/os-macOS-green.svg?style=flat" alt="macOS"> <img src="https://img.shields.io/badge/os-linux-green.svg?style=flat" alt="Linux"> <img src="https://img.shields.io/badge/license-Apache2-blue.svg?style=flat" alt="Apache 2"> <a href="http://swift-at-ibm-slack.mybluemix.net/"> <img src="http://swift-at-ibm-slack.mybluemix.net/badge.svg" alt="Slack Status"> </a> </p>

Kitura-Net

The Kitura-net module contains logic for sending and receiving HTTP requests. It also contains the structure for listening on a port and sending requests to a delegate for processing. It can be used to create HTTP/CGI servers on specific ports, and provides HTTP functionality.

We expect most of our users to require higher level concepts such as routing, templates and middleware, these are not provided in Kitura-net, if you want to use those facilities you should be coding at the Kitura level, for this please see the Kitura project. Kitura-net underpins Kitura which offers a higher abstraction level to users.

Kitura-net utilises the BlueSocket framework, the BlueSSLService framework and CCurl.

Features

Usage

Add dependencies

Add the Kitura-net package to the dependencies within your application’s Package.swift file. Substitute "x.x.x" with the latest Kitura-net release.

.package(url: "https://github.com/Kitura/Kitura-net.git", from: "x.x.x")

Add KituraNet to your target's dependencies:

.target(name: "example", dependencies: ["KituraNet"]),

Import package

import KituraNet

Prerequisites

As of Kitura-net 3.0.0, Swift 5.1+ is required.

Contributing to Kitura-net

All improvements to Kitura-net are very welcome! Here's how to get started with developing Kitura-net itself.

  1. Clone this repository.

$ git clone https://github.com/Kitura/Kitura-net && cd Kitura-net

  1. Build and run tests.

$ swift test

You can find more info on contributing to Kitura in our contributing guidelines.

API Documentation

For more information visit our API reference.

Community

We love to talk server-side Swift, and Kitura. Join our Slack to meet the team!

License

This library is licensed under Apache 2.0. Full license text is available in LICENSE.