如何在Gatling scala中提供签名方法HMAC-SH256?
请在下面找到我的代码
val httpMyConf : HttpProtocolBuilder = http
.baseUrl(baseURL)
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.doNotTrackHeader("1")
.acceptEncodingHeader("gzip, deflate")
.header("Cache-Control", "no-cache")
.header("Content-Type", "application/xml")
.header("Accept", "application/xml")
.header("Connection", "keep-alive")
val scn = scenario("test")
.exec(http("test")
.post("test")
.body(StringBody(apibody))
.signWithOAuth1("33e8a8c5-7b31-",
"eff39", "","")
.check(bodyString.saveAs("BODY")))
.exec(session => {
val response = session("BODY").as[String]
println(s"Response body: \n$response")
session
})
setUp(scn.inject(atOnceUsers(10))).protocols(httpMyConf)
我想让它担心HMAC256 使用邮递员USer授权->高级->签名方法已设置 我想在加特林做类似的事情吗? 提前感谢您的帮助