https://github.com/building42/httpparserc
HTTP message parser written in C
https://github.com/building42/httpparserc
c cocoapods http parser
Last synced: 3 months ago
JSON representation
HTTP message parser written in C
- Host: GitHub
- URL: https://github.com/building42/httpparserc
- Owner: Building42
- License: other
- Created: 2017-02-03T18:37:03.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T23:07:07.000Z (almost 2 years ago)
- Last Synced: 2025-10-21T10:54:13.515Z (3 months ago)
- Topics: c, cocoapods, http, parser
- Language: C
- Homepage:
- Size: 106 KB
- Stars: 30
- Watchers: 1
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HTTP Parser
===========
[](https://github.com/Building42/HTTPParserC/actions/workflows/ci.yml)
[](https://cocoapods.org/pods/HTTPParserC)
[](https://cocoapods.org/pods/HTTPParserC)
[](https://cocoapods.org/pods/HTTPParserC)
HTTP message parser written in C based on [llhttp](https://github.com/nodejs/llhttp). It parses both requests and
responses. The parser is designed to be used in performance HTTP
applications. It does not make any syscalls nor allocations, it does not
buffer data, it can be interrupted at anytime. Depending on your
architecture, it only requires about 40 bytes of data per message
stream (in a web server that is per connection).
Features:
* No dependencies
* Handles persistent streams (keep-alive).
* Decodes chunked encoding.
* Upgrade support
* Defends against buffer overflow attacks.
The parser extracts the following information from HTTP messages:
* Header fields and values
* Content-Length
* Request method
* Response status code
* Transfer-Encoding
* HTTP version
* Request URL
* Message body
## Installation
### Swift Package Manager
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code.
You can add Telegraph to your project by choosing the File - Swift Packages - Add Package Dependency option. Use the repository url as specified below and select the version you want to use.
Or you can manually add a `Package.swift` file to your project with:
```swift
dependencies: [
.package(url: "https://github.com/Building42/HTTPParserC.git")
]
```
### CocoaPods
CocoaPods is a dependency manager for Cocoa projects that makes dependencies a part of your workspace.
```ruby
pod 'HTTPParserC'
```
See [CocoaPods - Getting Started](https://guides.cocoapods.org/using/getting-started.html) for more information.
## Documentation
Visit https://github.com/nodejs/llhttp for more information