require 'net/http'
require 'uri'

# This is used for testing only
#
class ApiProxyController < ApplicationController
  def default
    uri = "/#{params[:url]}"
    uri += ".#{params[:format]}" if params[:format]
    parameters = params.except('controller', 'action', 'url', 'format')

    response = if request.get?
      NastyProxy.get uri
    elsif request.post?
      NastyProxy.post uri, body: parameters
    elsif request.put?
      NastyProxy.put uri, body: parameters
    end

    render json: response
  end
end

require 'net/http'
require 'uri'

# This is used for testing only
#
class ApiProxyController < ApplicationController
  def default
    uri = "/#{params[:url]}"
    uri += ".#{params[:format]}" if params[:format]
    parameters = params.except('controller', 'action', 'url', 'format').to_json

    response = if request.get?
      NastyProxy.get uri
    elsif request.post?
      NastyProxy.post uri, body: parameters
    elsif request.put?
      NastyProxy.put uri, body: parameters
    end

    render json: response
  end
end

Fix formatting of parameters for the proxy api
Fix formatting of parameters for the proxy api

Related to severe problems in IE9

Fixes: #2415
