How to send authentication with RequestAsync?

Hello,

This is a fairly simple issue that I’m dealing with, in that I don’t know how to include authentication details (just a simple username and password) with a HTTP GET request with RequestAsync().
Do I write the info as a header? If so, how exactly do I do this?

I’ve tried some things and they haven’t worked, and searching has pulled up no straightforward answers.

I’d appreciate any help with this :slightly_smiling_face:

Here’s is an example of something that I’ve tried that didn’t work:

local cred = (username..":"..password)

local request = httpService:RequestAsync({
	Url="https://www.example.com",
	Headers = {['Authorization']=cred}, -- this is supposed to provide the username and password for authentication
	Method="GET"	
})