Sha256: c577edfa1095c4d3cf987b8a5902c5ffc9db7e78f1766eed8d9950f549372be9

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true

require_relative "request_params/constants"
require_relative "request_params/entities"
require_relative "request_params/services"
require_relative "request_params/utils"

##
# @since 0.3.0
#
# @internal
#   Usage example:
#
#     http_string =
#       <<~TEXT
#         POST /rules/1000000.json HTTP/1.1
#         User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
#         Host: code-review.com
#         Content-Type: application/json; charset=utf-8
#         Content-Length: 134
#         Accept-Language: en-us
#         Accept-Encoding: gzip, deflate
#         Connection: Keep-Alive
#
#         {"title":"Avoid error shadowing","description":"Check the official User Docs","tags":["error-shadowing"]}
#       TEXT
#
#     request = ConvenientService::Examples::Standard::RequestParams::Entities::Request.new(http_string:)
#
#     ConvenientService::Examples::Standard::RequestParams.prepare(request)
#
#   - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
#   - https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome
#   - https://www.tutorialspoint.com/http/http_requests.htm
#
module ConvenientService
  module Examples
    module Standard
      module RequestParams
        class << self
          def prepare(request)
            Services::Prepare[request: request]
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
convenient_service-0.11.0 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.10.1 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.10.0 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.9.0 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.8.0 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.7.0 lib/convenient_service/examples/standard/request_params.rb
convenient_service-0.6.0 lib/convenient_service/examples/standard/request_params.rb