# Make HTTP request immediatly but wait for the response async

**URL:** <https://discourse.julialang.org/t/make-http-request-immediatly-but-wait-for-the-response-async/118928>\
**Category:** General Usage\
**Created:** [September 2, 2024, 6:33am UTC](https://discourse.julialang.org/t/make-http-request-immediatly-but-wait-for-the-response-async/118928 "2024-09-02T06:33:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [September 2, 2024, 6:33am UTC](https://discourse.julialang.org/t/make-http-request-immediatly-but-wait-for-the-response-async/118928/1 "2024-09-02T06:33:31Z")

</div>

I want to make HTTP requests to some server. Such that the following holds:

1. I want data to reach the server as soon as possible.
2. I don’t care much about getting the response from the server quickly. Instead, I want the request to block as little as possible.

If I only cared about 1. I would do:

```julia
HTTP.post(...)

```

But it is blocking, so bad for 2. If I only cared about 2. I would do

```julia
@async HTTP.post(...

```

But the scheduler typically does not send these immediately violating 1.

How to have both, send the data immediately but wait for the response in a non-blocking way?

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [September 2, 2024, 10:30am UTC](https://discourse.julialang.org/t/make-http-request-immediatly-but-wait-for-the-response-async/118928/2 "2024-09-02T10:30:19Z")

</div>

I think you want `HTTP.open`. See [Client · HTTP.jl](https://juliaweb.github.io/HTTP.jl/stable/client/#Streaming-Requests).
