Sha256: d7f32bb155d7ea4b4014d2be5764de77b995275d9e6ae50e30979e525f9b9731

Contents?: true

Size: 636 Bytes

Versions: 58

Compression:

Stored size: 636 Bytes

Contents

# typed: strict
# frozen_string_literal: true

class HTTPService
  extend T::Sig

  class << self
    extend T::Sig

    CACHE_VERSION = "1"

    sig { returns(T.untyped) }
    def http_client
      Httpsensible::Client.new(user_agent: "PlugApp/#{PlugApp::Application::GIT_SHA}")
    end

    sig { params(url: String, params: T::Hash[Symbol, T.untyped]).returns(T.untyped) }
    def get(url, params: {})
      http_client.get(url, params: params)
    end

    sig { params(url: String, params: T::Hash[Symbol, T.untyped]).returns(T.untyped) }
    def post(url, params: {})
      http_client.post(url, params: params)
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
hephaestus-0.7.2.3 templates/app/services/http_service.rb
hephaestus-0.7.2.2 templates/app/services/http_service.rb
hephaestus-0.7.2.1 templates/app/services/http_service.rb
hephaestus-0.7.2 templates/app/services/http_service.rb
hephaestus-0.7.1 templates/app/services/http_service.rb
hephaestus-0.7.0 templates/app/services/http_service.rb
hephaestus-0.6.4 templates/app/services/http_service.rb
hephaestus-0.6.3 templates/app/services/http_service.rb
hephaestus-0.6.2 templates/app/services/http_service.rb
hephaestus-0.6.1 templates/app/services/http_service.rb
hephaestus-0.6.0 templates/app/services/http_service.rb
hephaestus-0.5.2 templates/app/services/http_service.rb
hephaestus-0.5.1 templates/app/services/http_service.rb
hephaestus-0.5.0 templates/app/services/http_service.rb
hephaestus-0.4.0 templates/app/services/http_service.rb
hephaestus-0.3.1 templates/app/services/http_service.rb
hephaestus-0.2.3 templates/app/services/http_service.rb
hephaestus-0.2.2 templates/app/services/http_service.rb