Permalink
Browse files

Merge pull request #8 from jacobian/patch-2

sets the content-type to JSON when writing to Librato.
  • Loading branch information...
2 parents 664bd53 + d20174f commit c6e6d9c509d8b63e939509ad94caf6dac85ba82f @cyberdelia committed Jul 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 metrology/reporter/librato.py
@@ -86,7 +86,8 @@ def write(self):
}
requests.post("https://metrics-api.librato.com/v1/metrics",
data=dumps(metrics),
- auth=(self.email, self.token))
+ auth=(self.email, self.token),
+ headers={'content-type': 'application/json'})
def prepare_metric(self, name, type, metric, keys, snapshot_keys=[]):
base_name = re.sub(r"\s+", "_", name)

0 comments on commit c6e6d9c

Please sign in to comment.