mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 19:36:55 +02:00
http: new abi
This commit is contained in:
@@ -635,6 +635,7 @@ LIB_DEFINE(InitNet_1_Http) {
|
||||
LIB_FUNC("P6A3ytpsiYc", Http::HttpDeleteConnection);
|
||||
LIB_FUNC("tsGVru3hCe8", Http::HttpCreateRequest);
|
||||
LIB_FUNC("Aeu5wVKkF9w", Http::HttpCreateRequest);
|
||||
LIB_FUNC("rGNm+FjIXKk", Http::HttpCreateRequest2);
|
||||
LIB_FUNC("Cnp77podkCU", Http::HttpCreateRequestWithURL2);
|
||||
LIB_FUNC("qe7oZ+v4PWA", Http::HttpDeleteRequest);
|
||||
LIB_FUNC("PTiFIUxCpJc", Http::HttpSetRequestContentLength);
|
||||
|
||||
@@ -2818,6 +2818,27 @@ int KYTY_SYSV_ABI HttpCreateRequest(int conn_id, int method, const char* path,
|
||||
return id.ToInt();
|
||||
}
|
||||
|
||||
int KYTY_SYSV_ABI HttpCreateRequest2(int conn_id, const char* method, const char* path,
|
||||
uint64_t content_length) {
|
||||
PRINT_NAME();
|
||||
|
||||
LOGF("\t conn_id = %d\n"
|
||||
"\t method = %s\n"
|
||||
"\t path = %s\n"
|
||||
"\t content_length = %" PRIu64 "\n",
|
||||
conn_id, method, path, content_length);
|
||||
|
||||
EXIT_IF(g_net == nullptr);
|
||||
|
||||
if (method == nullptr || path == nullptr) {
|
||||
return HTTP_ERROR_INVALID_VALUE;
|
||||
}
|
||||
|
||||
auto id =
|
||||
g_net->HttpCreateRequestWithURL2(Network::Id(conn_id), method, path, content_length);
|
||||
return id.IsValid() ? id.ToInt() : HTTP_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
int KYTY_SYSV_ABI HttpCreateRequestWithURL2(int conn_id, const char* method, const char* url,
|
||||
uint64_t content_length) {
|
||||
PRINT_NAME();
|
||||
|
||||
@@ -106,6 +106,8 @@ int KYTY_SYSV_ABI HttpCreateConnectionWithURL(int tmpl_id, const char* url, int
|
||||
int KYTY_SYSV_ABI HttpDeleteConnection(int conn_id);
|
||||
int KYTY_SYSV_ABI HttpCreateRequest(int conn_id, int method, const char* path,
|
||||
uint64_t content_length);
|
||||
int KYTY_SYSV_ABI HttpCreateRequest2(int conn_id, const char* method, const char* path,
|
||||
uint64_t content_length);
|
||||
int KYTY_SYSV_ABI HttpCreateRequestWithURL2(int conn_id, const char* method, const char* url,
|
||||
uint64_t content_length);
|
||||
int KYTY_SYSV_ABI HttpSetRequestContentLength(int request_id, uint64_t content_length);
|
||||
|
||||
Reference in New Issue
Block a user