Registry / networking / http-accept

http-accept

JSON →
library2.2.1rbrubygemsunverified

Parse Accept and Accept-Language HTTP headers.

gem install http-accept
INSTALL
IMPORT
SIG · HTTP-ACCEPT
H
http-accept
networkingrubyv2.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HTTPAccept
require 'http-accept'

Parses an Accept header and retrieves the preferred media type.

require 'http-accept' media_types = HTTPAccept::MediaTypes.parse('text/html, application/json;q=0.9') puts media_types.first.mime_type
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.2.1latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
http-accept — gem install http-accept · libregistry