Parsing Simple HTTP Headers for swift

Overview

HTTP Headers

Parsing simple HTTP headers using pre-defined header descriptions.

Examples:

let response = HTTPURLRseponse(..., headers: [
    "X-RateLimit-Reset": "2015-01-01T00:00:00Z"
])

let header = HTTPHeader<Date>(field: "X-RateLimit-Reset")
let date = try header.parse(from: response)
// let date = try header.parseIfPresent(from: response)
You might also like...
Elegant HTTP Networking in Swift
Elegant HTTP Networking in Swift

Alamofire is an HTTP networking library written in Swift. Features Component Libraries Requirements Migration Guides Communication Installation Usage

Swift HTTP for Humans
Swift HTTP for Humans

Just is a client-side HTTP library inspired by python-requests - HTTP for Humans. Features Just lets you to the following effortlessly: URL queries cu

Versatile HTTP Networking in Swift
Versatile HTTP Networking in Swift

Net is a versatile HTTP networking library written in Swift. 🌟 Features URL / JSON / Property List Parameter Encoding Upload File / Data / Stream / M

🏇 A Swift HTTP / HTTPS networking library just incidentally execute on machines
🏇 A Swift HTTP / HTTPS networking library just incidentally execute on machines

Thus, programs must be written for people to read, and only incidentally for machines to execute. Harold Abelson, "Structure and Interpretation of Com

Swift/Obj-C HTTP framework with a focus on REST and JSON

Now Archived and Forked PMHTTP will not be maintained in this repository going forward. Please use, create issues on, and make PRs to the fork of PHMT

Thin wrapper around NSURLSession in swift. Simplifies HTTP requests.

SwiftHTTP SwiftHTTP is a thin wrapper around NSURLSession in Swift to simplify HTTP requests. Features Convenient Closure APIs Simple Queue Support Pa

A Swift web framework and HTTP server.
A Swift web framework and HTTP server.

A Swift Web Framework and HTTP Server Summary Kitura is a web framework and web server that is created for web services written in Swift. For more inf

Tiny http server engine written in Swift programming language.

What is Swifter? Tiny http server engine written in Swift programming language. Branches * stable - lands on CocoaPods and others. Supports the latest

A lightweight library for writing HTTP web servers with Swift

Taylor Disclaimer: Not actively working on it anymore. You can check out some alternatives Swift 2.0 required. Working with Xcode 7.1. Disclaimer: It

Comments
  • Add support for Linux

    Add support for Linux

    error: emit-module command failed with exit code 1 (use -v to see invocation)[10/11] Emitting module HTTPHeaders /GitHub/.build/checkouts/HTTPHeaders/Sources/HTTPHeaders/HTTPHeader.swift:16:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.

    opened by liamnichols 0
  • Support Linux

    Support Linux

    error: emit-module command failed with exit code 1 (use -v to see invocation)[10/11] Emitting module HTTPHeaders /GitHub/.build/checkouts/HTTPHeaders/Sources/HTTPHeaders/HTTPHeader.swift:16:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.

    opened by liamnichols 0
  • Update the year in LICENSE

    Update the year in LICENSE

    I'm looking at submitting a Formula for create-api and one of the requirements is including a license so I'm looking at updating all the repos under the CreateAPI org.

    opened by liamnichols 0
Releases(0.1.1)
  • 0.1.1(Aug 2, 2022)

    What's Changed

    • Update the year in LICENSE by @liamnichols in https://github.com/CreateAPI/HTTPHeaders/pull/1
    • Fix HTTPHeadersTests.testParseString() by @liamnichols in https://github.com/CreateAPI/HTTPHeaders/pull/5
    • Add support for Linux by @liamnichols in https://github.com/CreateAPI/HTTPHeaders/pull/4

    Full Changelog: https://github.com/CreateAPI/HTTPHeaders/compare/0.1.0...0.1.1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Jan 4, 2022)

  • 0.0.1(Dec 10, 2021)

Owner
Alexander Grebenyuk
I write kean.blog and like porridge
Alexander Grebenyuk
A barebones Swift HTTP client with automatic JSON response parsing.

HTTP Client A barebones Swift HTTP client with automatic JSON response parsing. Installation Add HTTP Client as a dependency through Xcode or directly

Joe Masilotti 30 Oct 11, 2022
Http - Demo for Http Layer

http Example To run the example project, clone the repo, and run pod install fro

null 0 Jan 24, 2022
A simple GCD based HTTP client and server, written in 'pure' Swift

SwiftyHTTP Note: I'm probably not going to update this any further - If you need a Swift networking toolset for the server side, consider: Macro.swift

Always Right Institute 116 Aug 6, 2022
Simple asynchronous HTTP networking class for Swift

YYHRequest YYHRequest is a simple and lightweight class for loading asynchronous HTTP requests in Swift. Built on NSURLConnection and NSOperationQueue

yayuhh 77 May 18, 2022
A simple HTTP server written in Swift

http4swift http4swift is a tiny HTTP server library for Nest-compatible applications. This project is unstable, and the API might be changed at anytim

Shun Takebayashi 27 Jun 29, 2022
QwikHttp is a robust, yet lightweight and simple to use HTTP networking library for iOS, tvOS and watchOS

QwikHttp is a robust, yet lightweight and simple to use HTTP networking library. It allows you to customize every aspect of your http requests within a single line of code, using a Builder style syntax to keep your code super clean.

Logan Sease 2 Mar 20, 2022
A simple, lighweight library for making http requets in iOS

HttpKIT Super simple, super lighweight library for making http requets in IOS. It is a work in progress so PR's are definitelty welcome and highly enc

null 0 Dec 5, 2021
🤵🏽‍♀️ Janet — A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveraging the power of async/await.

????‍♀️ Janet — Just another networking kit — A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveragi

Niklas Holloh 3 Sep 6, 2022
Lightweight Networking and Parsing framework made for iOS, Mac, WatchOS and tvOS.

NetworkKit A lightweight iOS, Mac and Watch OS framework that makes networking and parsing super simple. Uses the open-sourced JSONHelper with functio

Alex Telek 30 Nov 19, 2022
Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)

⚠ Important Notice: Farewell ws... hello Networking ! Networking is the next generation of the ws project. Think of it as ws 2.0 built for iOS13. It u

Fresh 351 Oct 2, 2022