Skip to content

Commit ab63f1e

Browse files
fix(client): handle multiple auth options gracefully
1 parent 529c386 commit ab63f1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Orb/ParamsBase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ protected string QueryString(IOrbClient client)
144144

145145
protected static void AddDefaultHeaders(HttpRequestMessage request, IOrbClient client)
146146
{
147-
request.Headers.Add("Authorization", string.Format("Bearer {0}", client.APIKey));
147+
if (client.APIKey != null)
148+
{
149+
request.Headers.Add("Authorization", string.Format("Bearer {0}", client.APIKey));
150+
}
148151
}
149152
}

0 commit comments

Comments
 (0)