alamofuzi

Introduction

Welcome to the documentation for Alamofuzi, a powerful networking library for iOS. This documentation will guide you through the installation process, usage, and API reference to help you get started quickly and easily.

Getting Started

Follow these steps to get started with Alamofuzi:

  1. Install Alamofuzi by adding it to your project’s dependencies or manually adding the framework.
  2. Import Alamofuzi in your source files:
  3. // Swift
      import Alamofuzi
      
      // Objective-C
      @import Alamofuzi;
  4. Create an instance of `SessionManager` to handle your network requests:
  5. // Swift
      let sessionManager = SessionManager.default
      
      // Objective-C
      AlamoFuziSessionManager *sessionManager = [AlamoFuziSessionManager defaultManager];
  6. Start making HTTP requests using the various methods provided by Alamofuzi:
  7. // Swift
      sessionManager.request("https://api.example.com/data")
          .responseJSON { response in
              // Handle response
          }
      
      // Objective-C
      [sessionManager request:@"https://api.example.com/data"].responseJSON:^(id _Nullable response, NSError * _Nullable error) {
          // Handle response
      }];

Dependencies

Alamofuzi has the following dependencies:

Features

The key features of Alamofuzi include:

  • Easy integration with existing projects.
  • Support for various HTTP methods (GET, POST, PUT, DELETE, etc.).
  • Automatic handling of request and response serialization.
  • Built-in support for handling authentication, headers, and query parameters.
  • Graceful error handling and retrying capabilities.
  • Support for SSL pinning and certificate validation.

Usage

To use Alamofuzi in your project, simply follow the steps below:

Adding the Library

  1. Using CocoaPods:
  2. pod 'Alamofuzi'
  3. Using Carthage:
  4. github "Alamofuzi/Alamofuzi"
  5. Manually:
  6. Download the latest version of Alamofuzi from the GitHub repository. Then, manually add the framework to your Xcode project.

Using Alamofuzi

After adding the library to your project, you can import it and start using it as follows:

  1. Import Alamofuzi in your source files:
  2. // Swift
      import Alamofuzi
      
      // Objective-C
      @import Alamofuzi;
  3. Create an instance of `SessionManager` to handle your network requests:
  4. // Swift
      let sessionManager = SessionManager.default
      
      // Objective-C
      AlamoFuziSessionManager *sessionManager = [AlamoFuziSessionManager defaultManager];
  5. Start making HTTP requests using the various methods provided by Alamofuzi:
  6. // Swift
      sessionManager.request("https://api.example.com/data")
          .responseJSON { response in
              // Handle response
          }
      
      // Objective-C
      [sessionManager request:@"https://api.example.com/data"].responseJSON:^(id _Nullable response, NSError * _Nullable error) {
          // Handle response
      }];

API Reference

The API reference provides detailed information about the available classes, methods, and properties in Alamofuzi. Use the links below to navigate the API reference:

Conclusion

Congratulations! You have successfully set up Alamofuzi and learned the basics of using it in your iOS project. Now you can start building powerful networking functionality with ease.