From c2425e761ab12ca249f0430009d4ef6b20700675 Mon Sep 17 00:00:00 2001 From: kballou Date: Tue, 21 Jun 2016 12:48:42 -0600 Subject: Add URI.encode to url building This fixes issues with spaces being in the query string, e.g., queries like `avg(up) by (job)` would fail without running the query (and URL string) through URI.encode --- lib/ex_prometheus_io/query.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ex_prometheus_io/query.ex b/lib/ex_prometheus_io/query.ex index 0c346b5..bd4bb9c 100644 --- a/lib/ex_prometheus_io/query.ex +++ b/lib/ex_prometheus_io/query.ex @@ -2,6 +2,7 @@ defmodule ExPrometheusIo.Query do def process(query, query_opts, query_ref, owner) do build_url(query, query_opts) + |> URI.encode |> fetch_json() |> Poison.decode |> send_results(query_ref, owner) -- cgit v1.2.1