Skip to content

Commit

Permalink
update for vapor 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmcd committed May 4, 2018
1 parent 816894e commit fb32e81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
.library(name: "Bugsnag", targets: ["Bugsnag"]),
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0-rc.2")
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0")
],
targets: [
.target(name: "Bugsnag", dependencies: ["Vapor"]),
Expand Down
10 changes: 3 additions & 7 deletions Sources/Bugsnag/ConnectionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ public final class ConnectionManager {
}

public func submitPayload<C: Content>(_ content: C) throws -> Future<Response> {
return client.post(url, content: content)
}

// MARK: - Private helpers

private func headers() -> HTTPHeaders {
return HTTPHeaders([("Content-Type", "application/json")])
return client.post(url, beforeSend: { req in
try req.content.encode(content, as: .json)
})
}
}

0 comments on commit fb32e81

Please sign in to comment.