Swiftpack.co -  PedroFarina/Endpoints-Requests as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
PedroFarina/Endpoints-Requests
A Swift library to manage gets and posts from servers.
.package(url: "https://github.com/PedroFarina/Endpoints-Requests.git", from: "1.1.31")

Endpoints Requests Package

A simplified Swift library to manage gets and posts from servers.

This framework was built for handling gets and posts from any servers.

Get:

When in need of a get request all you have to do is one call:

EndpointsRequests.getRequest which creates a get request and can do the following:

  • Add headers
  • Return the answer as:
  • Given by the server
  • A decodable object
  • Trigger a completion handler with its answer

Post:

When in need of a post request all you have to do is one call:

EndpointsRequests.postRequest which creates a post requests and can do the following:

  • Add headers
  • Add params as a:
  • Dictionary with key/value
  • Encodable object
  • Return the answer as:
  • Given by the server
  • A decodable object
  • Trigger a completion handler with its answer

Errors

The answers might be errors when:

  • An error occurs on the server
  • An invalid URL was passed as parameter
  • Could not encode object as JSON

GitHub

link
Stars: 3
Last commit: 1 year ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

Adding header field to json posts
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics