Skip to content

rename to async-http-client #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Code of Conduct
To be a truly great community, SwiftNIOHTTPClient needs to welcome developers from all walks of life,
To be a truly great community, AsyncHTTPClient needs to welcome developers from all walks of life,
with different backgrounds, and with a wide range of experience. A diverse and friendly
community will have more great ideas, more unique perspectives, and produce more great
code. We will work diligently to make the SwiftNIOHTTPClient community welcoming to everyone.
code. We will work diligently to make the AsyncHTTPClient community welcoming to everyone.

To give clarity of what is expected of our members, SwiftNIOHTTPClient has adopted the code of conduct
To give clarity of what is expected of our members, AsyncHTTPClient has adopted the code of conduct
defined by [contributor-covenant.org](https://www.contributor-covenant.org). This document is used across many open source
communities, and we think it articulates our values well. The full text is copied below:

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
For the purpose of tracking copyright, this is the list of individuals and
organizations who have contributed source code to the SwiftNIOHTTPClient.
organizations who have contributed source code to the AsyncHTTPClient.

For employees of an organization/company where the copyright of work done
by employees of that company is held by the company itself, only the company
Expand Down
16 changes: 8 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// swift-tools-version:5.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand All @@ -16,22 +16,22 @@
import PackageDescription

let package = Package(
name: "swift-nio-http-client",
name: "async-http-client",
products: [
.library(name: "NIOHTTPClient", targets: ["NIOHTTPClient"]),
.library(name: "AsyncHTTPClient", targets: ["AsyncHTTPClient"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
],
targets: [
.target(
name: "NIOHTTPClient",
name: "AsyncHTTPClient",
dependencies: ["NIO", "NIOHTTP1", "NIOSSL", "NIOConcurrencyHelpers"]
),
.testTarget(
name: "NIOHTTPClientTests",
dependencies: ["NIOHTTPClient", "NIOFoundationCompat"]
name: "AsyncHTTPClientTests",
dependencies: ["AsyncHTTPClient", "NIOFoundationCompat"]
),
]
)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SwiftNIOHTTPClient
# AsyncHTTPClient
This package provides simple HTTP Client library built on top of SwiftNIO.

This library provides the following:
Expand All @@ -10,7 +10,7 @@ This library provides the following:

---

**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `SwiftNIOHTTPClient`.
**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `AsyncHTTPClient`.

---

Expand All @@ -21,18 +21,18 @@ Add the following entry in your <code>Package.swift</code> to start using <code>

```swift
// it's early days here so we haven't tagged a version yet, but will soon
.package(url: "https://github.com/swift-server/swift-nio-http-client.git", .branch("master"))
.package(url: "https://github.com/swift-server/async-http-client.git", .branch("master"))
```
and `NIOHTTPClient` dependency to your target:
and `AsyncHTTPClient` dependency to your target:
```swift
.target(name: "MyApp", dependencies: ["NIOHTTPClient"]),
.target(name: "MyApp", dependencies: ["AsyncHTTPClient"]),
```

#### Request-Response API
The code snippet below illustrates how to make a simple GET request to a remote server:

```swift
import NIOHTTPClient
import AsyncHTTPClient

let httpClient = HTTPClient(eventLoopGroupProvider: .createNew)
httpClient.get(url: "https://swift.org").whenComplete { result in
Expand Down Expand Up @@ -63,7 +63,7 @@ In this case shutdown of the client is not neccecary.

Most common HTTP methods are supported out of the box. In case you need to have more control over the method, or you want to add headers or body, use the `HTTPRequest` struct:
```swift
import NIOHTTPClient
import AsyncHTTPClient

let httpClient = HTTPClient(eventLoopGroupProvider: .createNew)
defer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import AsyncHTTPClient
import Foundation
import NIOHTTPClient
import XCTest

class HTTPClientCookieTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

@testable import AsyncHTTPClient
import NIO
import NIOConcurrencyHelpers
import NIOHTTP1
@testable import NIOHTTPClient
import XCTest

class HTTPClientInternalTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import AsyncHTTPClient
import Foundation
import NIO
import NIOHTTP1
import NIOHTTPClient
import NIOSSL

class TestHTTPDelegate: HTTPClientResponseDelegate {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import AsyncHTTPClient
import NIO
import NIOFoundationCompat
import NIOHTTP1
import NIOHTTPClient
import XCTest

class HTTPClientTests: XCTestCase {
Expand Down
8 changes: 4 additions & 4 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIOHTTPClient open source project
// This source file is part of the AsyncHTTPClient open source project
//
// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors
// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors
// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors
//
// SPDX-License-Identifier: Apache-2.0
//
Expand All @@ -23,7 +23,7 @@ import XCTest
///

#if os(Linux) || os(FreeBSD)
@testable import NIOHTTPClientTests
@testable import AsyncHTTPClientTests

XCTMain([
testCase(HTTPClientCookieTests.allTests),
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.1804.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ version: "3"
services:

runtime-setup:
image: swift-nio-http-client:18.04-5.0
image: async-http-client:18.04-5.0
build:
args:
ubuntu_version: "18.04"
swift_version: "5.0"

test:
image: swift-nio-http-client:18.04-5.0
image: async-http-client:18.04-5.0
Loading