No commit activity in last 3 years
No release in over 3 years
HTTP Adapters for PayPal SDK
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0
~> 3.0
~> 3.1
 Project Readme

HTTP Adapters for PayPal SDKBuild Status

This gem extends PayPal SDK and allows you to set specific http library.

Currently it supports two adapters:

  • :net_http - Net::HTTP (default, blocking I/O)
  • :em_http - EM::Http (non-blocking I/0)

Installation

Add this line to your application's Gemfile:

gem 'paypal-sdk-http-adapters'

And then execute:

$ bundle

Or install it yourself as:

$ gem install paypal-sdk-http-adapters

NetHttp Adapter

PayPal::SDK.http_adapter_name = :net_http

This is default adapter that actually is very simple wrapper for standard Net::HTTP.

EmHttp Adapter

PayPal::SDK.http_adapter_name = :em_http

This is adapter for EM::Http library.

When EventMachine is already running we assume that you are responsible for Fiber allocation. You can add Rack::FiberPool to your application middleware and it automatically provides a Fiber for each incoming HTTP request. It creates pool of Fibers and re-use fiber for each incoming HTTP request. Also you can control the connection pool size.

Authors

References