index.ts298 chars14 lines
The header
field in the config
object can be used to specify any custom headers that need to be sent with the request. In this case, the Custom-Header
with a value of Some value
is being sent along with the GET request to https://example.com/api/data
.
The axios
library is being used here for making the HTTP request. It is a popular client for making HTTP requests in JavaScript/TypeScript.
gistlibby LogSnag