Skip to content

avgx/Get

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

358 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get

Http client built using async/await.

Configured to log using Pulse Based on Get With certificate pinning via fingerprint option (based on samples)

Get provides a clear and convenient API for modeling network requests using Request<Response> type. And its HttpClient5 makes it easy to execute these requests and decode the responses.

// Create a client
let client = HttpClient5(baseURL: URL(string: "https://api.github.com"))

// Request json with get
let user: User = try await client.send(Request(path: "/user")).value

// Request json with post
var request = Request(path: "/user/emails", method: .post, body: ["alex@me.com"])
try await client.send(request)

// Don't decode for string
let string: String = try await client.send(Request(path: "/user")).value

// Don't decode for Data
let data: Data = try await client.send(Request(path: "/favicon.ico")).value

Documentation

Learn how to use Get by going through the documentation created using DocC.

To learn more about URLSession, see URL Loading System.

License

Get is available under the MIT license. See the LICENSE file for more info.

About

Http client built using async/await

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 100.0%