mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 17:25:02 +00:00
Clean up basic function names
This commit is contained in:
3 files changed
+14
-4
No files matched your search
+2
-2
@@ -2496,7 +2496,7 @@ int uploadGist(std::string name, std::string path, std::string content, bool wri
|
|||||||
{
|
{
|
||||||
//std::cerr<<"No gist id is provided. Creating new gist...\n";
|
//std::cerr<<"No gist id is provided. Creating new gist...\n";
|
||||||
writeLog(0, "No Gist id is provided. Creating new Gist...", LOG_LEVEL_ERROR);
|
writeLog(0, "No Gist id is provided. Creating new Gist...", LOG_LEVEL_ERROR);
|
||||||
retVal = curlPost("https://api.github.com/gists", buildGistData(path, content), getSystemProxy(), token, &retData);
|
retVal = webPost("https://api.github.com/gists", buildGistData(path, content), getSystemProxy(), token, &retData);
|
||||||
if(retVal != 201)
|
if(retVal != 201)
|
||||||
{
|
{
|
||||||
//std::cerr<<"Create new Gist failed! Return data:\n"<<retData<<"\n";
|
//std::cerr<<"Create new Gist failed! Return data:\n"<<retData<<"\n";
|
||||||
@@ -2511,7 +2511,7 @@ int uploadGist(std::string name, std::string path, std::string content, bool wri
|
|||||||
writeLog(0, "Gist id provided. Modifying Gist...", LOG_LEVEL_INFO);
|
writeLog(0, "Gist id provided. Modifying Gist...", LOG_LEVEL_INFO);
|
||||||
if(writeManageURL)
|
if(writeManageURL)
|
||||||
content = "#!MANAGED-CONFIG " + url + "\n" + content;
|
content = "#!MANAGED-CONFIG " + url + "\n" + content;
|
||||||
retVal = curlPatch("https://api.github.com/gists/" + id, buildGistData(path, content), getSystemProxy(), token, &retData);
|
retVal = webPatch("https://api.github.com/gists/" + id, buildGistData(path, content), getSystemProxy(), token, &retData);
|
||||||
if(retVal != 200)
|
if(retVal != 200)
|
||||||
{
|
{
|
||||||
//std::cerr<<"Modify gist failed! Return data:\n"<<retData<<"\n";
|
//std::cerr<<"Modify gist failed! Return data:\n"<<retData<<"\n";
|
||||||
|
|||||||
@@ -204,6 +204,11 @@ int curlPost(std::string url, std::string data, std::string proxy, std::string a
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int webPost(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData)
|
||||||
|
{
|
||||||
|
return curlPost(url, data, proxy, auth_token, retData);
|
||||||
|
}
|
||||||
|
|
||||||
int curlPatch(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData)
|
int curlPatch(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
@@ -241,3 +246,8 @@ int curlPatch(std::string url, std::string data, std::string proxy, std::string
|
|||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int webPatch(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData)
|
||||||
|
{
|
||||||
|
return curlPatch(url, data, proxy, auth_token, retData);
|
||||||
|
}
|
||||||
+2
-2
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
std::string webGet(std::string url, std::string proxy);
|
std::string webGet(std::string url, std::string proxy);
|
||||||
std::string webGet(std::string url, std::string proxy, std::string &response_headers, unsigned int cache_ttl = 0);
|
std::string webGet(std::string url, std::string proxy, std::string &response_headers, unsigned int cache_ttl = 0);
|
||||||
int curlPost(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData);
|
int webPost(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData);
|
||||||
int curlPatch(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData);
|
int webPatch(std::string url, std::string data, std::string proxy, std::string auth_token, std::string *retData);
|
||||||
std::string buildSocks5ProxyString(std::string addr, int port, std::string username, std::string password);
|
std::string buildSocks5ProxyString(std::string addr, int port, std::string username, std::string password);
|
||||||
|
|
||||||
// Unimplemented: (CURLOPT_HTTPHEADER: Host:)
|
// Unimplemented: (CURLOPT_HTTPHEADER: Host:)
|
||||||
|
|||||||
Reference in new issue
Block a user