From 7f366445b1662691b6b64374e81a28c393999a6c Mon Sep 17 00:00:00 2001 From: Ailton Vieira Date: Fri, 16 Jun 2023 21:43:28 -0300 Subject: [PATCH] Add table of contents and Installation instructions --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index cdc5e58..3900ee4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ SwiftRequest is a lightweight, type-safe HTTP client for Swift, streamlining the construction and execution of HTTP requests. +[Overview](#overview) • [Installation](#installation) • [Supported HTTP Methods](#supported-http-methods) • [Parameters](#parameters) • [License](#license) ## Overview SwiftRequest abstracts away the repetitive boilerplate code that's typically associated with setting up HTTP requests in Swift. It utilizes macros introduced in Swift 5.9, which can be associated with specific declarations to enhance and extend their functionality. @@ -29,6 +30,30 @@ let quotes = try await service.getRandomQuotes(limit: 5) let quote = try await service.getQuote(by: "69Ldsxcdm-") ``` +## Installation + +### Xcode + +> It requires Xcode 15 or later. + +In Xcode, go to `File > Add Package Dependency` and paste the repository URL: +``` +https://github.com/ailtonvivaz/swift-request.git +``` + +### Swift Package Manager + +In `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/ailtonvivaz/swift-request.git", from: "0.1.0") +] +``` + +And then add the dependency to your targets. + + ## Supported HTTP Methods SwiftRequest offers support for the following HTTP methods: