<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="389990" data-post-id="389990">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Correct, if someone opts in and ends up hitting a malicious server, there are no other mitigations at the moment for eagerly reading response body, ie just Req.get. When using streaming, via into: fun, one can keep an accumulator of read bytes and and bail; automatic decompression for :into was never available in the first place (that’s something I plan to allow in future release however).</p>
<p>Im planning to revamp streaming from into: fun to an explicit Req.stream(req, acc, fun), and allow streaming decompression AND decoding. And a :max_body_size option, which I think will have to default to :infinity however, so at least that’d be an easy knob to turn. Stay tuned.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389990" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/req-a-batteries-included-http-client-for-elixir/48494/62">Post #61</a>
	                </div>
	            </div>
              <div id="likers-container-389990" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389990"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #61"></div>
  </section>
</div>
    <div class="postbit" id="389991" data-post-id="389991">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="62" data-topic="48494">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>Im planning to revamp streaming from into: fun to an explicit Req.stream(req, acc, fun), and allow streaming decompression AND decoding.</p>
</blockquote>
</aside>
<p>That’s what my eternally-upcoming SQLite3 library is doing. I found it the better pattern. It’s actually dual-use: I have a higher-level helper that supplies the functions (private inside the library) and it also allows you to plug functions to the lower-level streaming function.</p>
<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="62" data-topic="48494">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>When using streaming, via into: fun, one can keep an accumulator of read bytes and and bail</p>
</blockquote>
</aside>
<p>Yeah, best security measure against bloated payloads are conservative limits that the user/client of the library enforces themselves. We’re about to open our service to much more webhooks and I’d really love to start using Req with that upcoming feature. Currently we are using Tesla (with Finch below) as we can plug anything and everything. We probably can make it work just fine with Req as well but I’d feel much better if you made this particular thing a first-class feature and vetted it.</p>
<p>Looking forward. Thanks again for relentlessly working on this library (and many others).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389991" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/req-a-batteries-included-http-client-for-elixir/48494/63">Post #62</a>
	                </div>
	            </div>
              <div id="likers-container-389991" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389991"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #62"></div>
  </section>
</div>
    <div class="postbit" id="389997" data-post-id="389997">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jswanner" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jswanner/120/24585_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jswanner
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="62" data-topic="48494">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>Im planning to revamp streaming from into: fun to an explicit Req.stream(req, acc, fun)</p>
</blockquote>
</aside>
<p>You’ve made me very curious about your plans here, <a class="mention" href="/u/wojtekmach" rel="nofollow">@wojtekmach</a></p>
<p>Echoing <a class="mention" href="/u/dimitarvp" rel="nofollow">@dimitarvp</a>: thanks for all your work addressing the CVEs and the latest releases!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389997" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/req-a-batteries-included-http-client-for-elixir/48494/64">Post #63</a>
	                </div>
	            </div>
              <div id="likers-container-389997" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389997"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>