From d7d8346482468ce116a39f6aadb109bcb6b94db8 Mon Sep 17 00:00:00 2001 From: Nefarius Date: Sat, 7 Jun 2014 20:12:03 +0200 Subject: [PATCH] Removed HTTP status code definitions in webternet.inc --- plugins/include/webternet.inc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/include/webternet.inc b/plugins/include/webternet.inc index 0debcdb22..c125eaacd 100644 --- a/plugins/include/webternet.inc +++ b/plugins/include/webternet.inc @@ -36,10 +36,8 @@ #define _webternet_included /** - * @section HTTP request status codes. + * @section HTTP request natives. */ -#define HTTP_OK 1 /* Request finished without errors */ -#define HTTP_ERROR 0 /* Request failed, call HTTP_GetLastError() for more information. */ /** * HTTP download function callbacks. @@ -86,7 +84,7 @@ native bool:HTTP_SetFailOnHTTPError(Handle:session, bool:fail); * * @return True on success, false on fail/error. */ -native HTTP_GetLastError(Handle:session, String:error[], maxlen); +native bool:HTTP_GetLastError(Handle:session, String:error[], maxlen); /** * Creates a new file-based download handler. It stores the response as a local file. @@ -135,7 +133,7 @@ native HTTP_GetBodySize(Handle:downloader); * Beware that this function fails if the buffer is too small; * count in one extra byte for the NULL-terminator. */ -native HTTP_GetBodyContent(Handle:downloader, String:body[], maxlen); +native bool:HTTP_GetBodyContent(Handle:downloader, String:body[], maxlen); /** * Creates a new empty web form handle. @@ -158,7 +156,7 @@ native Handle:HTTP_CreateWebForm(); * * @note The supplied data gets URL-encoded automatically. */ -native HTTP_AddStringToWebForm(Handle:form, const String:name[], const String:data[]); +native bool:HTTP_AddStringToWebForm(Handle:form, const String:name[], const String:data[]); /** * Adds a local file to upload to an existing web form. @@ -168,7 +166,7 @@ native HTTP_AddStringToWebForm(Handle:form, const String:name[], const String:da * @param path The local file path. * @return True on success, false on fail/error. */ -native HTTP_AddFileToWebForm(Handle:form, const String:name[], const String:path[]); +native bool:HTTP_AddFileToWebForm(Handle:form, const String:name[], const String:path[]); /** * Initiates an asynchronous download attempt (GET-request) for a given URL. @@ -186,7 +184,7 @@ native HTTP_AddFileToWebForm(Handle:form, const String:name[], const String:path * Session and download handle have to be freed with CloseHandle() * after the corresponding callback function has been executed. */ -native HTTP_Download(Handle:session, Handle:downloader, const String:url[], HTTP_SessionCallback:callback, any:data = INVALID_HANDLE); +native bool:HTTP_Download(Handle:session, Handle:downloader, const String:url[], HTTP_SessionCallback:callback, any:data = INVALID_HANDLE); /** * Initiates an asynchronous download attempt (POST-request) for a given URL. @@ -206,7 +204,7 @@ native HTTP_Download(Handle:session, Handle:downloader, const String:url[], HTTP * after the corresponding callback function has been executed. * The web form handle is not closed as it may be reused. */ -native HTTP_PostAndDownload(Handle:session, Handle:downloader, Handle:form, const String:url[], HTTP_SessionCallback:callback, any:data = INVALID_HANDLE); +native bool:HTTP_PostAndDownload(Handle:session, Handle:downloader, Handle:form, const String:url[], HTTP_SessionCallback:callback, any:data = INVALID_HANDLE); /** * @endsection