Commit Graph

59 Commits

Author SHA1 Message Date
tastytea f4bd5abd01
Fix some warnings.
Avoid copy, initialize members in header, initialize variables.
2020-11-13 14:17:44 +01:00
tastytea 9efc8d2dfd
Reformat source files. 2020-11-13 14:00:03 +01:00
tastytea b5144fd9ce
Ensure that the first parameter in all GET calls is prefaced with ?.
continuous-integration/drone/push Build is passing Details
All calls to CURLWrapper::add_parameters_to_uri() but the first used & for all
parameters, because the boolean keeping track was implemented wrong.
2020-03-20 16:29:16 +01:00
tastytea fc32e8ac0a
Add copy constructor for CURLWrapper.
The copy constructor does the same as the constructor. A new CURL handle is used
for the “copy”.
2020-03-20 13:49:20 +01:00
tastytea da1c2ba409
Handle more than one replacement in replace_parameter_in_uri().
continuous-integration/drone/push Build is passing Details
2020-03-12 12:12:31 +01:00
tastytea 00056c224e
Update parameter replacements for Pleroma 2.0.0.
continuous-integration/drone/push Build is passing Details
2020-03-12 11:40:11 +01:00
tastytea 185ab91978
Rename buffer_mutex → _buffer_mutex.
continuous-integration/drone/push Build is passing Details
2020-01-28 08:11:56 +01:00
tastytea deeff83410
Make some private members of CURLWrapper static.
continuous-integration/drone/push Build is passing Details
replace_parameter_in_uri(), add_parameters_to_uri() and add_mime_part().
2020-01-26 08:50:05 +01:00
tastytea b82d779119
Use brace initialization for _stream_cancelled. 2020-01-26 04:10:59 +01:00
tastytea fe5ac46d52
Explicitly call CURLWrapper::set_useragent() in setup_curl(). 2020-01-26 03:51:32 +01:00
tastytea 5e612210ef
Log proxy changes when debugging.
continuous-integration/drone/push Build is passing Details
2020-01-16 18:17:29 +01:00
tastytea 99f00e331a
Silence false-positive clang-tidy warning,
continuous-integration/drone/push Build was killed Details
and one I can't do anything about.
2020-01-14 23:46:42 +01:00
tastytea 59a9747c06
Add account_id and list_id to list of parameters to replace in URIs.
continuous-integration/drone/push Build is passing Details
2020-01-14 22:50:14 +01:00
tastytea 1b4ad05acb
Add set_useragent(). 2020-01-12 17:37:06 +01:00
tastytea 04526f37cc
Make argument of CURLWrapper::set_cafile() const. 2020-01-12 17:27:40 +01:00
tastytea 975fe57677
Simplify connection setup.
By adding CURLWrapper::setup_connection_properties.
2020-01-12 17:24:02 +01:00
tastytea 97eb269865
Add Instance::set_cainfo(). 2020-01-12 13:37:53 +01:00
tastytea 597cf41668
Don't check errors if it can't fail.
continuous-integration/drone/push Build is passing Details
2020-01-11 18:08:33 +01:00
tastytea 078f6d0c73
Log URI replacements. 2020-01-11 16:42:01 +01:00
tastytea 5c61d6fd27
Add support for DELETE requests. 2020-01-11 16:24:06 +01:00
tastytea f556df296f
Add HTTP methods PATCH and PUT. 2020-01-11 16:07:40 +01:00
tastytea 8d04f7e9ea
Add support for sending files in HTTP forms. 2020-01-11 14:36:49 +01:00
tastytea f0a35bfd5b
Add add_mime_part().
Makes code more readable and decreases duplication.
2020-01-11 13:17:35 +01:00
tastytea 7ac1bc1377
Hide CURLWrapper::cancel_stream(). 2020-01-10 18:57:42 +01:00
tastytea 796e159cdc
Actually set the proxy to the string in CURLWrappper::set_proxy(). 2020-01-10 18:50:53 +01:00
tastytea f601e770ac
Define CURLAUTH_BEARER as CURLAUTH_ANY with libcurl < 7.61.0
continuous-integration/drone/push Build is passing Details
2020-01-10 17:43:50 +01:00
tastytea 20167fdce3
Replace if constexpr with preprocessor if.
continuous-integration/drone/push Build is passing Details
2020-01-10 17:15:23 +01:00
tastytea c47a62969f
Only use CURLAUTH_BEARER if libcurl supports it.
continuous-integration/drone/push Build is failing Details
2020-01-10 17:10:36 +01:00
tastytea da033c3ffc
Silence clang-tidy warnings I can't do anything about.
continuous-integration/drone/push Build is failing Details
2020-01-10 14:35:44 +01:00
tastytea cb7019a0fd
Allow HTTP POST without parameters. 2020-01-10 14:33:33 +01:00
tastytea c3bb9a20c4
Send the access token. 2020-01-10 14:26:50 +01:00
tastytea 1910e780b0
Add vector fields to HTTP forms. 2020-01-10 14:24:35 +01:00
tastytea 89c50951b3
Fix User-Agent. 2020-01-10 13:41:38 +01:00
tastytea f222215116
Implement HTTP POST in CURLWrapper. 2020-01-10 13:08:34 +01:00
tastytea bb6b00114e
Clear buffers before making a request.
continuous-integration/drone/push Build is passing Details
2020-01-09 13:14:24 +01:00
tastytea 839e29b37b
Expand section about thread safety in documentation. 2020-01-09 11:23:30 +01:00
tastytea 7edcb7c507
Add streaming example. 2020-01-08 21:49:48 +01:00
tastytea 0e3b812b54
Only check for libcurl return code if it could return an error. 2020-01-08 21:36:59 +01:00
tastytea d2de78ff9e
Add streaming support. 2020-01-08 21:27:27 +01:00
tastytea a724006854
Make curl writer non-satatic and add static wrapper.
We need to use the mutex, a class member, from within the writer function.
2020-01-08 19:55:34 +01:00
tastytea c93810e241
Move URI building for GET requets to add_parameters_to_uri(). 2020-01-08 17:51:53 +01:00
tastytea deed340f3d
Add set_proxy(). 2020-01-08 17:20:36 +01:00
tastytea 1f78b00205
Replace string with string_view where possible. 2020-01-08 16:46:27 +01:00
tastytea 2ab0018df9
Replace arguments in URI.
continuous-integration/drone/push Build is passing Details
id, nickname, nickname_or_id, hashtag, permission_group.
2020-01-08 14:13:55 +01:00
tastytea c07fb1db71
Add support for parameters (GET). 2020-01-08 13:06:12 +01:00
tastytea 15c1e15466
Follow up to 10 HTTP redirects automatically.
This includes permanent redirects.
2020-01-08 11:53:01 +01:00
tastytea 50ae16002b
Make curlwrapper_instances explicitly atomic.
continuous-integration/drone/push Build is passing Details
2020-01-08 11:27:19 +01:00
tastytea f01ec3eee0
Set User-Agent. 2020-01-06 16:38:09 +01:00
tastytea 3c6c56d973
Make curlwrapper_instances static. 2020-01-05 20:27:28 +01:00
tastytea be2f00faae
Do global curl init / cleanup only once.
continuous-integration/drone/push Build is passing Details
2020-01-05 19:09:22 +01:00