I need to enter login and password on web page (in HTML form) before accessing the URL. How do I do this using your HTTP client?
If you have some particular site or sites that you need to login to, you can try to automate this operation.
First of all, you need to look at the source code of the web page with the login form. You need to find <form> tag and analyze, what fields (form elements have id and/or name parameter, this is how the elements are identified) are present in the form, and depending on their type, create your POST request: the page to submit the data to is specified in <form> tag, field names are taken from the form element tags (such as <input> or <textarea>) and your application provides field values. Next you use POST method of TElHTTPSClient to post the data.
The next step is to capture the cookies that are returned by the server in response to the POST operation. This is implemented by handling OnCookie event and saving the provided cookie information. Note that the cookie contains not just the cookie data itself, but also supplementary information (metadata) that tells you how to apply the cookie and the period, during which this cookie is valid.
The following step is to send this cookie when you request the target resource (for which you performed authorization). During this step you need to add the obtained cookie to RequestCookies list.