mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-03 14:56:01 +02:00
Curl enhancements
This commit is contained in:
parent
954f6312b8
commit
879ac7f989
2 changed files with 25 additions and 2 deletions
|
@ -917,6 +917,12 @@ namespace CURL
|
|||
return WrapResult((ReturnCode)curl_easy_setopt(mCURL, (int)option, (int)(void*)val.CStr()));
|
||||
}
|
||||
|
||||
public Result<void, ReturnCode> SetOpt(Option option, StringView val)
|
||||
{
|
||||
Debug.Assert((int)option / 10000 == 1);
|
||||
return WrapResult((ReturnCode)curl_easy_setopt(mCURL, (int)option, (int)(void*)scope String(4096)..Append(val).CStr()));
|
||||
}
|
||||
|
||||
public Result<void, ReturnCode> SetOpt(Option option, int val)
|
||||
{
|
||||
Debug.Assert(((int)option / 10000 == 0) || ((int)option / 10000 == 3));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue