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.11 templates/app/services/http_service.rb
hephaestus-0.8.10 templates/app/services/http_service.rb
hephaestus-0.8.9.2 templates/app/services/http_service.rb
hephaestus-0.8.9.1 templates/app/services/http_service.rb
hephaestus-0.8.9 templates/app/services/http_service.rb
hephaestus-0.8.8 templates/app/services/http_service.rb
hephaestus-0.8.7.5 templates/app/services/http_service.rb
hephaestus-0.8.7.4 templates/app/services/http_service.rb
hephaestus-0.8.7.3 templates/app/services/http_service.rb
hephaestus-0.8.7.2 templates/app/services/http_service.rb
hephaestus-0.8.7.1 templates/app/services/http_service.rb
hephaestus-0.8.7 templates/app/services/http_service.rb
hephaestus-0.8.6 templates/app/services/http_service.rb
hephaestus-0.8.5 templates/app/services/http_service.rb
hephaestus-0.8.4.1 templates/app/services/http_service.rb
hephaestus-0.8.4 templates/app/services/http_service.rb
hephaestus-0.8.3.4 templates/app/services/http_service.rb
hephaestus-0.8.3.3 templates/app/services/http_service.rb
hephaestus-0.8.3.2 templates/app/services/http_service.rb
hephaestus-0.8.3.1 templates/app/services/http_service.rb