andrew9691 opened a new issue, #35404:
URL: https://github.com/apache/airflow/issues/35404

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### What happened
   
   HttpAsyncHook with method='PUT' and data is not supported. As far as I 
understood PUT is not in the [list of available 
methods](https://github.com/apache/airflow/blob/main/airflow/providers/http/hooks/http.py#L368)
 for passing kwarg `json=data`
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   generate some PUT async hook runs with some data and await them:
   ```python
   http_async_hook = HttpAsyncHook(method='PUT', http_conn_id='some_conn_id')
   hook_run_1 = http_async_hook.run(
       endpoint=f'/some/endpoint/{some_data_1["id"]}',
       data=some_data_1
   )
   hook_run_2 = http_async_hook.run(
       endpoint=f'/some/endpoint/{some_data_2["id"]}',
       data=some_data_2
   )
   tasks = [hook_run_1, hook_run_2]
   responses = await asyncio.gather(*tasks)
   ```
   
   ### Operating System
   
   NAME="Linux Mint" VERSION="21.2 (Victoria)" ID_LIKE="ubuntu 
debian"VERSION_ID="21.2" UBUNTU_CODENAME=jammy
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow==2.7.0
   apache-airflow-providers-http==4.6.0
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to