fixes : set_url discards username and password

This commit is contained in:
ganeshlandge
2019-08-05 14:27:48 +05:30
parent 1c1108d47b
commit 9fd16c6a5f
3 changed files with 75 additions and 16 deletions

View File

@@ -264,6 +264,20 @@ esp_err_t esp_http_client_get_header(esp_http_client_handle_t client, const char
*/
esp_err_t esp_http_client_get_username(esp_http_client_handle_t client, char **value);
/**
* @brief Set http request username.
* The value of username parameter will be assigned to username buffer.
* If the username parameter is NULL then username buffer will be freed.
*
* @param[in] client The esp_http_client handle
* @param[in] username The username value
*
* @return
* - ESP_OK
* - ESP_ERR_INVALID_ARG
*/
esp_err_t esp_http_client_set_username(esp_http_client_handle_t client, const char *username);
/**
* @brief Get http request password.
* The address of password buffer will be assigned to value parameter.
@@ -278,6 +292,20 @@ esp_err_t esp_http_client_get_username(esp_http_client_handle_t client, char **v
*/
esp_err_t esp_http_client_get_password(esp_http_client_handle_t client, char **value);
/**
* @brief Set http request password.
* The value of password parameter will be assigned to password buffer.
* If the password parameter is NULL then password buffer will be freed.
*
* @param[in] client The esp_http_client handle
* @param[in] password The password value
*
* @return
* - ESP_OK
* - ESP_ERR_INVALID_ARG
*/
esp_err_t esp_http_client_set_password(esp_http_client_handle_t client, char *password);
/**
* @brief Set http request method
*