Created
January 10, 2019 09:16
-
-
Save mensfeld/0ff9009e7ced616b8699404977c76ce7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Net::HTTP::Post | |
.new('/', 'Content-Type': 'application/json') | |
.tap { |req| req.body_stream = StringIO.new(operation) } | |
.tap { |req| req.content_length = operation.bytesize } | |
.yield_self(&@http.method(:request)) | |
.yield_self(&:body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment