There are two data transports (not including the API) that involve HTTP:
Download via HTTP - Data is requested from an external website by entering the URL of a text file in the data source configuration
Upload via HTTP - Data is submitted as an HTTP POST body to an automatically generated URL associated with a data source
For both of these transports, using HTTP Basic authentication is an option.
With the Download via HTTP transport, you would use HTTP Basic authentication only if this is required by the external website. You would need to know the username and password of the website. The username and password can be included in the URL in the following format:
Note that you can test the URL in your web browser first to make sure it works before setting up an eagle.io data source
With the Upload via HTTP transport, you get to make the choice of whether to use HTTP Basic authentication or not, by changing the Authentication option in the data source from None to Basic Authentication:
Note that selecting Basic Authentication will populate the Username field with the same 3-word key that was generated at the end of the unique URL. In this example, the 3-word key is call-north-sheet. The password is chosen by the user; in this case I have chosen a password of foobar.
When sending data to this data source, the URL would be:
If I use Postman as a HTTP client and try to send data to the data source without including any authentication in the URL, the response will be 401 Unauthorized and the response body will helpfully say Authorization required:
Looking at the eagle.io events as this request is sent, we will see an event to indicate that authorization is required:
If I now include the correct username but an incorrect password in the URL, we see another 401 Unauthorized response, this time with a body of Invalid password:
The eagle.io events will now additionally show the password is invalid:
Finally, if I use the correct password, the request will be successful:
And the eagle.io events are updated to indicate that data was acquired: