SignatureCalculator API

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

SignatureCalculator API

Hi All,

Has anyone used SignatureCalculator API to explain to me how to effectively use it to create a token (once) and cache it to be used for testing? I have looked at the interface SignatureCalculator but I am not able to understand how to implement it.

This is what I have right now:
lass mySignatureCalculator extends SignatureCalculator {

// Default Headers
val defaultHeaders = Map("Content-Type" -> "application/json", "Authorization" -> "Basic 123345")

// Http Client Config
val httpConf: HttpProtocolBuilder = http
.baseURL("") // Here is the root for all relative URLs
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") // Here are the common headers
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0")

var called = false

override def calculateAndAddSignature(request: Request,
requestBuilder: RequestBuilderBase[_]): Unit = {

called = true

Thank you very much.

You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit