Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doriantaylor/rb-http-negotiate
An implementation of Gisle Aas's (Perl) HTTP::Negotiate in Ruby
https://github.com/doriantaylor/rb-http-negotiate
Last synced: 24 days ago
JSON representation
An implementation of Gisle Aas's (Perl) HTTP::Negotiate in Ruby
- Host: GitHub
- URL: https://github.com/doriantaylor/rb-http-negotiate
- Owner: doriantaylor
- License: apache-2.0
- Created: 2020-07-07T03:06:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T21:47:47.000Z (11 months ago)
- Last Synced: 2024-03-15T03:34:28.370Z (10 months ago)
- Language: Ruby
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP::Negotiate
This is literally just a port of Gisle Aas's
[HTTP::Negotiate](https://metacpan.org/pod/HTTP::Negotiate) written in
Perl, with a couple tiny changes to the interface. The `negotiate`
method is accessible as either a class method or instance method, so
you can take your pick of interface.## Usage
```ruby
require 'http/negotiate'# access it as an ordinary function
HTTP::Negotiate.negotiate request, variants# ...or include it as an instance method
class Foo
include HTTP::Negotiate
# you now have access to #negotiate
end```
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'http-negotiate'
```And then execute:
$ bundle install
Or install it yourself as:
$ gem install http-negotiate
## Contributing
Bug reports and pull requests are welcome at
[the Github repository](https://github.com/doriantaylor/rb-http-negotiate).## Copyright & License
©2020 [Dorian Taylor](https://doriantaylor.com/)
This software is provided under
the [Apache License, 2.0](https://www.apache.org/licenses/LICENSE-2.0).