Popularity
4.2
Growing
Activity
0.0
Stable
16
3
1
Programming language: C
License: MIT License
Tags:
HTTP
http_parser.cr alternatives and similar shards
Based on the "HTTP" category.
Alternatively, view http_parser.cr alternatives based on common mentions on social networks and blogs.
-
route.cr
Minimum High Performance Middleware for Crystal Web Server. -
halite
💎HTTP Requests Client with a chainable REST API, built-in sessions and middlewares. -
Cable
It's like ActionCable (100% compatible with JS Client), but you know, for Crystal -
cossack
Simple and flexible HTTP client for Crystal with middleware and test support. -
http-protection
This library protects against typical web attacks. It was inspired in rack-protection Ruby gem. -
helmet
a port of the Node Helmet module to the Crystal programming language -
crystal-routing
Extensible library to deal with http request and string based routing in Crystal -
http-multiserver.cr
Mount multiple web applications 🚦 -
http-params-serializable
The HTTP params parsing module for Crystal 🤓 -
multipart.cr
Adds multipart and multipart/form-data support to the crystal standard library -
ContentDisposition
Crystal shard to create HTTP Content-Disposition headers with proper escaping/encoding of filenames -
proxy-fetcher.cr
Crystal port of awesome Ruby ProxyFetcher gem -
http_distributor
http server which allows sneaky http request though it. -
router-simple.cr
simple path router inspired by Router::Simple. -
crystal-cossack
Simple and flexible HTTP client for Crystal with middleware and test support.
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
Do you think we are missing an alternative of http_parser.cr or a related project?
README
HttpParser
Crystal wrapper for Http Parser lib: https://github.com/joyent/http-parser. And for Http multipart parser https://github.com/iafonov/multipart-parser-c
Installation
Add this to your application's shard.yml
:
dependencies:
http_parser:
github: kostya/http_parser.cr
branch: master
Usage
require "http_parser"
puts HttpParser.version_string
str = "
GET / HTTP/1.1
Host: www.example.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 S
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
"
parser = HttpParser::Request.new
parser << str
p parser.headers
p parser.method
p parser.http_version
p parser.request_url
Multipart Example:
str = "--AaB03x\r\n"+
"content-disposition: form-data; name=\"field1\"\r\n"+
"\r\n"+
"Joe Blow\r\nalmost tricked you!\r\n"+
"--AaB03x\r\n"+
"content-disposition: form-data; name=\"pics\"; filename=\"file1.txt\"\r\n"+
"Content-Type: text/plain\r\n"+
"\r\n"+
"... contents of file1.txt ...\r\r\n"+
"--AaB03x--\r\n"
m = HttpParser::Multipart.new("AaB03x")
m << str
p m.parts