MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Http_AsyncGetSkin

Function Http_AsyncGetSkin

src/_HttpBase.h:334–344  ·  view source on GitHub ↗

#######################################################################################################################* *----------------------------------------------------Http public api------------------------------------------------------* *#########################################################################################################################*/

Source from the content-addressed store, hash-verified

332*----------------------------------------------------Http public api------------------------------------------------------*
333*#########################################################################################################################*/
334int Http_AsyncGetSkin(const cc_string* skinName, cc_uint8 flags) {
335 cc_string url; char urlBuffer[URL_MAX_SIZE];
336 String_InitArray(url, urlBuffer);
337
338 if (Utils_IsUrlPrefix(skinName)) {
339 String_Copy(&url, skinName);
340 } else {
341 String_Format2(&url, "%s/%s.png", &skinServer, skinName);
342 }
343 return Http_AsyncGetData(&url, flags);
344}
345
346int Http_AsyncGetData(const cc_string* url, cc_uint8 flags) {
347 return Http_Add(url, flags, REQUEST_TYPE_GET, NULL, NULL, NULL, 0, NULL);

Callers 1

CheckSkin_UncheckedFunction · 0.70

Calls 4

Utils_IsUrlPrefixFunction · 0.85
String_CopyFunction · 0.85
String_Format2Function · 0.85
Http_AsyncGetDataFunction · 0.70

Tested by

no test coverage detected