Skip to content
Perfect 3 -> 4 compatability
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources
Tests
.gitignore
LICENSE
Package.swift
README.md

README.md

Perfect-NIOCompat

Perfect 3 -> 4 compatability

This package provides compatability for Perfect 3 apps to run on Perfect 4 NIO with minimal changes.

In Package.swift:

Add:

.package(url: "https://github.com/PerfectlySoft/Perfect-NIOCompat.git", .branch("master"))

Remove:

.package(url: "https://github.com/PerfectlySoft/Perfect-HTTP.git", ...

.package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", ...

.package(url: "https://github.com/PerfectlySoft/Perfect-Mustache.git", ...

.package(url: "https://github.com/PerfectlySoft/Perfect-WebSockets.git", ...

Compatability for the four packages above are included herein.


If you are using PerfectCURL, PerfectSMTP, or PerfectNotifications, make sure the version is from: "4.0.0".


In source files:

Add:

import PerfectNIOCompat

Remove:

import PerfectHTTP

import PerfectHTTPServer

import PerfectMustache

import PerfectWebSockets


The following is no longer supported:

No access to raw connection

HTTPRequest.connection: NetTCP

No mutable HTTPRequest

HTTPRequest.addHeader(...)

HTTPRequest.setHeader(...)

No multiplexer or HTTP/2

HTTPMultiplexer

HTTP/2, ALPN

You can’t perform that action at this time.