diff --git a/lib/shopify/config.ex b/lib/shopify/config.ex index c4f58a2..09b4dc7 100644 --- a/lib/shopify/config.ex +++ b/lib/shopify/config.ex @@ -13,6 +13,8 @@ defmodule Shopify.Config do def password, do: get(:password) + def request_timeout, do: get(:request_timeout) + def version, do: Mix.Project.config()[:version] def fixtures_path do diff --git a/lib/shopify/request.ex b/lib/shopify/request.ex index 01d95fc..22103de 100644 --- a/lib/shopify/request.ex +++ b/lib/shopify/request.ex @@ -13,7 +13,7 @@ defmodule Shopify.Request do @headers [ "Content-Type": "application/json", - "Keep-Alive": "timeout=15, max=100", + "Keep-Alive": "timeout=#{Shopify.Config.request_timeout()}, max=100", "user-agent": "ShopifyElixir/#{Shopify.Config.version()}" ]