Sha256: b7656005b7a129b48fd0a1b965d53d8e72a92a5e05f6f4ab9ad22bd8af854a27
Contents?: true
Size: 1 KB
Versions: 31
Compression:
Stored size: 1 KB
Contents
module Aws module CloudSearchDomain module Plugins # CloudSearchDomain has query length limits for #search in GET # Convert #search operation request from GET to POST class SwitchToPost < Seahorse::Client::Plugin # @api private class Handler < Seahorse::Client::Handler def call(context) convert_get_2_post(context) @handler.call(context) end private def convert_get_2_post(context) context.http_request.http_method = 'POST' uri = context.http_request.endpoint context.http_request.body = uri.query context.http_request.headers['Content-Length'] = uri.query.length context.http_request.headers['Content-Type'] = 'application/x-www-form-urlencoded' context.http_request.endpoint.query = nil end end handler( Handler, step: :build, operations: [:search] ) end end end end
Version data entries
31 entries across 31 versions & 1 rubygems