Rhai Scripting - URL in headers

Hello, I am trying to set headers in a Rhai script. However, the headers are url’s. When I try to run my queries in the playground, I get this error:

rhai execution error: 'Runtime error: invalid HTTP header name

My code looks something like:

fn process_request(request) {
    let keys = request.context[context.here];
    let key_users = ["https://url-one", "https://url-two"];
    for key_user in key_users {
      let key = keys[key_user];
      key = if key == () {""} else {key};
      request.subgraph.headers[key_user] = key;

I’ve been referencing this but not having much luck