title: ClientException "failed to parse header value" when using Googleapis_auth package with flutter
body: <p>I'm trying to develop a flutter (web) application which needs to invoke access restricted http triggered cloud functions.</p>
  
  <p>Therefore I have created a service account in my google cloud console and followed the example on how to retrieve an authenticated http client as an autonomous application of the googleapis_auth package (<a href="https://github.com/dart-lang/googleapis_auth" rel="nofollow noreferrer">https://github.com/dart-lang/googleapis_auth</a>).</p>
  
  <pre><code>final accountCredentials = new ServiceAccountCredentials.fromJson(r'''{ "private_key_id": "****", "private_key": "****", "client_email": "****.iam.gserviceaccount.com", "client_id": "****", "type": "service_account" }'''); 
  var scopes = [CloudfunctionsApi.CloudPlatformScope]; 
  AuthClient client = await clientViaServiceAccount(accountCredentials, scopes);
  </code></pre>
  
  <p>This seems to work fine. But when I try to use the received client to make a post request to my cloud function, I get a ClientException ("failed to parse header value").</p>
  
  <pre><code>http.Response resp = await client.post( CloudFunctiontriggerURL, body: {'data': userId});
  </code></pre>
  
  <p>As I understand the examples, this should work fine without specifying any headers manually in the POST function call. Correct?
  However, even if I specify the header manually, I get this error.</p>
  
  <p>Any help with this would be highly appreciated.</p>