Skip to content

Commit

Permalink
Fix content-type in Logger.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
deadblackclover committed Feb 27, 2020
1 parent c2341c4 commit 9b331f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/com/acrylplatform/extensions/node/Logger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ class Logger(context: ExtensionContext, settings: Settings) extends ScorexLoggin
.headers(settings.webhook.headers.flatMap(s =>
s.split(":") match {
case Array(a, b) =>
Seq(("Content-type", "application/json"), (a.trim, b.trim))
Seq((a.trim, b.trim))
case _ =>
log.error(s"""Can't parse "$s" header! Please check "webhook.headers" config. Its values must be in the "name: value" format""")
Seq(("Content-type", "application/json"))
Seq.empty
}))
.postData(json)
.header("content-type", "application/json")
.method("POST")
.asString
} catch {
Expand Down

0 comments on commit 9b331f9

Please sign in to comment.