I'd like to contribute exactly how to add http basic authentication to your SharePoint workflow call.
While designing your Workflow build a dictionary to hold your request header.
In this dictionary add one item of type String with the Name "Authorization".
Now you need your value.
For the value explanation I'll just quote wikipedia:
The Authorization field is constructed as follows:
The username and password are combined with a single colon. (:)
The resulting string is encoded into an octet sequence.
The resulting string is encoded using a variant of Base64.
The authorization method and a space (e.g. "Basic ") is then prepended to the encoded string, separated with a space.
For example, if the browser uses Aladdin as the username and OpenSesame as the password, then the field's value is the base64-encoding of Aladdin:OpenSesame, or QWxhZGRpbjpPcGVuU2VzYW1l. Then the Authorization header will appear as:
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Source: https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side
So in the example above your Value for the Authorization would be:
"Basic QWxhZGRpbjpPcGVuU2VzYW1l"
Note that you have to provide the already Base64 encrypted Username:Password Segment. You cannot send it in Plain Text.
...
In order to encode my Username:Password I used a bit of C# Code
public static string Base64Encode(string plainText)
{
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}
public static string CreateBasicHTTPAuthorizationString(string username, string password)
{
string encodedPart = username + ":" + password;
encodedPart = Base64Encode(encodedPart);
string authorizationString = "Basic " + encodedPart;
return authorizationString;
}
Original Source: https://stackoverflow.com/questions/11743160/how-do-i-encode-and-decode-a-base64-string
How you handle the encoding is up to you.
...
Back to the task at hand: Now that we have our Request Header dictionary containing our Authorization we just add it to our Call Http Web Service command.
Right click the command in Workflow Designer and choose Properties...
There you just add our dictionary under RequestHeaders.
Good Luck.