In my API-based application, I need to send a token in the HTTP header for authentication purposes. What is the proper way to include this token in the header using various methods (e.g., JavaScript fetch, Axios, or curl)? Are there best practices for securely handling and sending tokens?
Examples of implementing token-based authentication in both frontend and backend environments would be helpful.