Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@muxelplexer
Copy link
Contributor

This can be relevant when the parameters need to be passed to some different library (i.e. libmpv, gstreamer) and there is no cpr::Session to get a CurlHolder from.


I ran the clang-format script - it brought up issues but not with the file i touched. If there is a better way already implemented please let me know :)

Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this MR.
Are you aware that something like this would also wok:

parameters.GetContent(CurlHolder());

(constructing a CurlHolder() is compatibly expensive)

@COM8
Copy link
Member

COM8 commented Sep 20, 2025

For running clang-format there is: scripts/run_clang_format.sh.

@muxelplexer
Copy link
Contributor Author

muxelplexer commented Sep 29, 2025

Are you aware that something like this would also wok:
(constructing a CurlHolder() is compatibly expensive)

Wasn't aware of that - it feels a bit wrong to do as well but i can see how that would have been easier 😅

I'll get into the tests & docs :)

@muxelplexer
Copy link
Contributor Author

Running the clang-format script i get following changed files:

On branch muxelplexer/getcontent
Your branch is up to date with 'origin-mux/muxelplexer/getcontent'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   cpr/connection_pool.cpp
        modified:   test/abstractServer.hpp
        modified:   test/connection_pool_tests.cpp
        modified:   test/proxy_tests.cpp

Can add the formatting of those into this MR but none of them should belong to my changes.

@muxelplexer muxelplexer requested a review from COM8 September 29, 2025 13:52
This can be relevant when the parameters need to be passed to some
different library (i.e. libmpv, gstreamer) and there is no cpr::Session
to get a CurlHolder from.

Signed-off-by: Sebastian Muxel <[email protected]>
Signed-off-by: Sebastian Muxel <[email protected]>
@muxelplexer muxelplexer force-pushed the muxelplexer/getcontent branch from 7d93a48 to 8e86e81 Compare October 11, 2025 12:25
Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@COM8 COM8 merged commit 54c477a into libcpr:master Oct 25, 2025
33 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants