HTTPBin

A Codable model for the httpbin api
Adding HTTPBin to your project
Clone from Github
- Clone repository from github and copy files directly, or add it as a git submodule.
- Add all files from
Sourcedirectory to your project.
Usage
Anywhere you want to use a Codable HTTPBin.
let networking = PequenoNetworking(baseURL: "https://httpbin.org")
networking.get(endpoint: "/get",
parameters: nil) { (result: Result<HTTPBin, Error>) in
let httpBin = try? result.get()
}
// or
let httpBin = try? JSONDecoder().decode(HTTPBin.self, from: jsonData)The above example uses PequenoNetworking from the Utensils project, but this can be used wherever you serialize, or deserialize json using the Codable apis.
Testing
This project has been setup to use fastlane to run the specs.
First, bundle required gems, install Cocoapods. Next, inside the root project directory run:
$ bundle
$ bundle exec pod installAnd then use fastlane to run all the specs on the command line:
$ bundle exec fastlane integrationSpecsSuggestions, requests, and feedback
Thanks for checking out Utensils. Any feedback, suggestions and feedback can be can be sent to: [email protected], or opened as a github issue.