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.
- Port Listening
- FastCGI Server support
- HTTP Server support (request and response)
Kitura-net package to the dependencies within your application’s
Package.swift file. Substitute
"x.x.x" with the latest
.package(url: "https://github.com/IBM-Swift/Kitura-net.git", from: "x.x.x")
KituraNet to your target's dependencies:
.target(name: "example", dependencies: ["KituraNet"]),
Contributing to Kitura-net
All improvements to Kitura-net are very welcome! Here's how to get started with developing Kitura-net itself.
- Clone this repository.
$ git clone https://github.com/IBM-Swift/Kitura-net && cd Kitura-net
- Build and run tests.
$ swift test
You can find more info on contributing to Kitura in our contributing guidelines.
For more information visit our API reference.
We love to talk server-side Swift, and Kitura. Join our Slack to meet the team!
This library is licensed under Apache 2.0. Full license text is available in LICENSE.
Help us keep the lights on
2.1.7 - Mar 5, 2019
- Disable curl's
Expectheader (#294): prevents ClientRequest (which uses curl) from sending an
Expect: 100-continueheader when sending payloads above a certain threshold, as Kitura does not support it (resulting in a 1 second delay for such requests).
2.1.5 - Jan 8, 2019
- fix: resolve crash on Linux with Swift 5 (#284)
2.1.4 - Jan 7, 2019
- fix: workaround to pass UInt16 value for ClientRequest.Options (#285) - resolves #275
2.1.3 - Dec 3, 2018
- fix: Ensure exclusive access (SE-0176) when mutating
2.1.2 - Sep 27, 2018
- Resolves compilation warnings with Swift 4.2 (#277)