Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9a8464c23e
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (15 sloc) 0.4 kb
require "unicode_utils"
module Faraday
class Response::NormalizeUtf < Response::Middleware
def initialize(app)
super(app)
end
def call(environment)
@app.call(environment).on_complete do |env|
env[:body] = UnicodeUtils.nfkd(env[:body])
env
end
end
end
end
Faraday.register_middleware :response, normalize_utf: Faraday::Response::NormalizeUtf
Jump to Line
Something went wrong with that request. Please try again.