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.8.3 templates/app/services/http_service.rb
hephaestus-0.8.2 templates/app/services/http_service.rb
hephaestus-0.8.1 templates/app/services/http_service.rb
hephaestus-0.8.0 templates/app/services/http_service.rb
hephaestus-0.7.7.2 templates/app/services/http_service.rb
hephaestus-0.7.7 templates/app/services/http_service.rb
hephaestus-0.7.6.2 templates/app/services/http_service.rb
hephaestus-0.7.6.1 templates/app/services/http_service.rb
hephaestus-0.7.6 templates/app/services/http_service.rb
hephaestus-0.7.5.3 templates/app/services/http_service.rb
hephaestus-0.7.5.2 templates/app/services/http_service.rb
hephaestus-0.7.5.1 templates/app/services/http_service.rb
hephaestus-0.7.5 templates/app/services/http_service.rb
hephaestus-0.7.4.2 templates/app/services/http_service.rb
hephaestus-0.7.4.1 templates/app/services/http_service.rb
hephaestus-0.7.4 templates/app/services/http_service.rb
hephaestus-0.7.3.1 templates/app/services/http_service.rb
hephaestus-0.7.3 templates/app/services/http_service.rb
hephaestus-0.7.2.5 templates/app/services/http_service.rb
hephaestus-0.7.2.4 templates/app/services/http_service.rb