0

Please help in how to convert below curl to equivalent scala Gatling code?

            curl --location --request POST 'https://test.salesforce.com/services/oauth2/token' \
            --header 'Content-Type: application/x-www-form-urlencoded' \
            --header 'Cookie: BrowserId=DbIfsfsf' \
            --data-urlencode '[email protected]' \
            --data-urlencode 'client_id=xxx' \
            --data-urlencode 'client_secret=xxxx' \
            --data-urlencode 'grant_type=password' \
            --data-urlencode 'password=xxxx'

1 Answer 1

1

Here there are all answers on your question https://gatling.io/docs/current/http/http_request


val myRequest = http("my request")
    .post("https://test.salesforce.com/services/oauth2/token")
    .header(HttpHeaderNames.ContentType, HttpHeaderValues.ApplicationFormUrlEncoded)
    .header("Cookie", "BrowserId=DbIfsfsf")
    .formParam("username", "[email protected]")
    .formParam("client_id", "xxx")
    .formParam("client_secret", "xxxx")
    .formParam("grant_type", "password")
    .formParam("password", "xxxx")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.