Declarative HTTP networking, designed for SwiftUI. swift-request can be installed via the Swift Package Manager. Once you've built your Request, you can specify the response handlers you want to use. .onData, .onString, .onJson, and .onError are available. You can chain them together to handle multiple response types, as they return a modified version of the Request. The body of the Request is built using the RequestBuilder @resultBuilder. It merges each RequestParam in the body into one CombinedParam object. This contains all the other params as children. When you run .call(), the children are filtered to find the Url, and any other optional parameters that may have been included.

Features

  • Set an HTTP header field
  • Create query strings
  • Add a param directly
  • Request and RequestGroup both conform to Publisher
  • You can use all of the Combine operators you'd expect on Request
  • The body of the Request is built using the RequestBuilder @resultBuilder

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Swift Request

Swift Request Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Swift Request!

Additional Project Details

Programming Language

Swift

Related Categories

Swift HTTP Servers, Swift HTTP Clients

Registered

2023-05-19