1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-03 14:56:01 +02:00

Curl enhancements

This commit is contained in:
Brian Fiete 2021-08-02 10:43:59 -07:00
parent 954f6312b8
commit 879ac7f989
2 changed files with 25 additions and 2 deletions

View file

@ -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));