# \[Question\] Massive credentials reading from feeder and encode with Base64 as Authorization: cannot parse from EL expression

**URL:** <https://community.gatling.io/t/question-massive-credentials-reading-from-feeder-and-encode-with-base64-as-authorization-cannot-parse-from-el-expression/4735>\
**Category:** Gatling (Open-Source)\
**Created:** [January 2, 2019, 3:24pm UTC](https://community.gatling.io/t/question-massive-credentials-reading-from-feeder-and-encode-with-base64-as-authorization-cannot-parse-from-el-expression/4735 "2019-01-02T15:24:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![westernguncyber](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@westernguncyber](https://community.gatling.io/u/westernguncyber)\
**Post date:** [January 2, 2019, 3:24pm UTC](https://community.gatling.io/t/question-massive-credentials-reading-from-feeder-and-encode-with-base64-as-authorization-cannot-parse-from-el-expression/4735/1 "2019-01-02T15:24:31Z")

</div>

Hi all,

I am developing a gatling test where I read from CVS circular feeder the email address (column “username”) and encode the password “1111” with email with Base64 to use as “Authorization” header in form of:

`Authorization: AppBasic xxxxx(Base64 encoded "test1@app.com:1111")`

Here comes the question: the EL expression “${username}” is not working when I use:

`

feed(env.feeder).exec(  
http(Seq(env.base, “authorize”).mkString(":"))  
.post(env.base + “/authorize”)  
.asJSON // “Accept” and “ContentType” set to JSON  
.header(HttpHeaderNames.AcceptCharset, “UTF-8”)  
.header(HttpHeaderNames.Authorization, Base64.getEncoder().encodeToString(("${username}" + “:” + “1111”).getBytes()))  
.body(StringBody(env.authorizeBody))  
.check(  
status.is(200),  
header(HttpHeaderNames.ContentType).is(HttpHeaderValues.ApplicationJson),  
header(HttpHeaderNames.AcceptCharset).is(“UTF-8”),  
jsonPath("$…id\_token") exists  
)  
)

`

Because interpolation in a method seems not to work.

So, I am trying something like:

`.header(HttpHeaderNames.Authorization, "${username}".map(username => Base64.getEncoder().encodeToString((username + ":" + "1111").getBytes())))`

which leads to a “Vector” of Base64-encoded each letter of the email address, which is not what I want; because “String.map” changes the string into a vector of byte.

So, what can I do here?? Why using the interpolation of EL expression works only out of a function, not inside?
