Skip to content

Commit

Permalink
minor code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
workingDog committed Feb 23, 2018
1 parent d35a299 commit 6d736de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/scala/com/kodekutters/taxii/TaxiiConnection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import scala.concurrent.ExecutionContext.Implicits._

object TaxiiConnection {
var taxiiVersion = "2.0"
val mediaType_stix = "application/vnd.oasis.stix+json"
val mediaType_taxii = "application/vnd.oasis.taxii+json"

// create an Akka system for thread and streaming management
implicit val system = ActorSystem()
Expand Down Expand Up @@ -78,16 +80,16 @@ case class TaxiiConnection(host: String,
val hash = Base64.getEncoder.encodeToString((user + ":" + password).getBytes(StandardCharsets.UTF_8))

val getHeaders = Map(
"Accept" -> "application/vnd.oasis.taxii+json",
"Accept" -> mediaType_taxii,
"version" -> taxiiVersion).toSeq

val postHeaders = Map(
"Accept" -> "application/vnd.oasis.taxii+json",
"Content-Type" -> "application/vnd.oasis.stix+json",
"Accept" -> mediaType_taxii,
"Content-Type" -> mediaType_stix,
"version" -> taxiiVersion).toSeq

val stixHeaders = Map(
"Accept" -> "application/vnd.oasis.stix+json",
"Accept" -> mediaType_stix,
"version" -> taxiiVersion).toSeq

// create the standalone Web Service client
Expand Down

0 comments on commit 6d736de

Please sign in to comment.