
oauth.requests.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dispatch-core_2.11 Show documentation
Show all versions of dispatch-core_2.11 Show documentation
Core Dispatch module wrapping async-http-client
package dispatch.oauth
import com.ning.http.client.oauth._
import dispatch._
class SigningVerbs(val subject: Req) extends RequestVerbs {
val emptyToken = new RequestToken(null, "")
def sign(consumer: ConsumerKey, token: RequestToken = emptyToken) = {
val calc = new OAuthSignatureCalculator(consumer, token)
subject underlying { r =>
calc.calculateAndAddSignature(r.build, r)
r
}
}
def <@(consumer: ConsumerKey, token: RequestToken = emptyToken) =
sign(consumer, token)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy