title: Rails Request Uri Too Large
body: <p>I have a method in my app that accepts a CSV of several hundred of a users contacts phone numbers, varying in length, but up to several thousand characters long. Upon attempting to execute the method as:</p>
  
  <p><code>localhost:3000/getActivatedFriends/phoneNum1,phoneNum2,phoneNum3...phoneNum350...etc</code></p>
  
  <p>the error below appeared:</p>
  
  <pre><code>Request-URI Too Large
  
  WEBrick::HTTPStatus::RequestURITooLarge
  </code></pre>
  
  <p>On my personal device, the number of characters in the CSV is 2868. How can I get around this limitation or perhaps set to unlimited length  in localhost and Heroku?</p>
  
  <p><em>request controller action:
  (please ignore possible SQL injection as this is simply in developement)</em></p>
  
  <pre><code>def getActivatedFriends
          @results = User.find_by_sql("SELECT 
                                                  a.id
                                               ,  a.username
                                               ,  a.phoneNumber
                                               FROM users a
                                               WHERE phoneNumber in (" + params[:friends_phone_number_csv].to_s + ") and
                                                     removed = 0 and
                                                     is_user = 1;")
  
          respond_to do |format|
              format.html
              format.json { render json: { friends_match: @results }}
          end         
      end
  </code></pre>
  
  <p><em>rails route:</em></p>
  
  <pre><code>get '/getActivatedFriends/:friends_phone_number_csv',
    to: 'requests#getActivatedFriends', via: 'post',
    constraints: { friends_phone_number_csv: /([0-9]+,?)+/ }
  </code></pre>