<commit_before>require "net/http"
require "uri"

module Roar
  module Representer
    # Implements the (HTTP) transport interface with Net::HTTP.
    module Transport
      # Definitions: every call returns a Response object responding to #body.
      class NetHTTP
        # TODO: generically handle return codes.
        def get_uri(uri, as)
          do_request(Net::HTTP::Get, uri, as)
        end
        
        def post_uri(uri, body, as)
          do_request(Net::HTTP::Post, uri, as)
        end
        
        def put_uri(uri, body, as)
          do_request(Net::HTTP::Put, uri, as)
        end
        
        def patch_uri(uri, body, as)
          do_request(Net::HTTP::Patch, uri, as)
        end
        
        def delete_uri(uri, as)
          do_request(Net::HTTP::Delete, uri, as)
        end
      
      private<commit_msg>fix missing body parameter for post put and patch in transport/net_http. Same fix may be needed for transport/faraday.<commit_after>require "net/http"
require "uri"

module Roar
  module Representer
    # Implements the (HTTP) transport interface with Net::HTTP.
    module Transport
      # Definitions: every call returns a Response object responding to #body.
      class NetHTTP
        # TODO: generically handle return codes.
        def get_uri(uri, as)
          do_request(Net::HTTP::Get, uri, as)
        end
        
        def post_uri(uri, body, as)
          do_request(Net::HTTP::Post, uri, as, body)
        end
        
        def put_uri(uri, body, as)
          do_request(Net::HTTP::Put, uri, as, body)
        end
        
        def patch_uri(uri, body, as)
          do_request(Net::HTTP::Patch, uri, as, body)
        end
        
        def delete_uri(uri, as)
          do_request(Net::HTTP::Delete, uri, as)
        end
      
      private
{'fraction_non_alphanumeric': 0.09070918086860913, 'fraction_numerical': 0.0, 'mean_word_length': 2.0182421227197347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2128351', 'n_tokens_mistral': 535, 'n_tokens_neox': 533, 'n_words': 165}