forked from enlightenment/efl
180 lines
12 KiB
Plaintext
180 lines
12 KiB
Plaintext
import eina_types;
|
|
|
|
enum @beta Efl.Net.Http.Version {
|
|
[[HTTP protocol versions]]
|
|
|
|
v1_0 = 100, [[HTTP version 1.0]]
|
|
v1_1 = 101, [[HTTP version 1.1]]
|
|
v2_0 = 200, [[HTTP version 2.0]]
|
|
}
|
|
|
|
enum @beta Efl.Net.Http.Authentication_Method {
|
|
[[HTTP authentication methods]]
|
|
|
|
none = 0, [[HTTP authentication method none]]
|
|
basic = (1 << 0), [[HTTP authentication method basic]]
|
|
digest = (1 << 1), [[HTTP authentication method digest]]
|
|
negotiate = (1 << 2), [[HTTP authentication method negotiate]]
|
|
ntlm = (1 << 3), [[HTTP authentication method ntlm]]
|
|
ntlm_winbind = (1 << 4), [[HTTP authentication method ntlm winbind]]
|
|
any_safe = Efl.Net.Http.Authentication_Method.digest | Efl.Net.Http.Authentication_Method.negotiate | Efl.Net.Http.Authentication_Method.ntlm | Efl.Net.Http.Authentication_Method.ntlm_winbind, [[HTTP authentication method any safe]]
|
|
any = Efl.Net.Http.Authentication_Method.any_safe | Efl.Net.Http.Authentication_Method.basic, [[HTTP authentication method any]]
|
|
}
|
|
|
|
enum @beta Efl.Net.Http.Status {
|
|
[[Common HTTP status codes. A more detailed description on the various HTTPS status codes can be
|
|
found one Wikipedia: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes]]
|
|
|
|
unknown = 0, [[HTTP status code: Unknown, likely not connected]]
|
|
|
|
/* Informational: 1xx */
|
|
continue = 100, [[HTTP status code: continue]]
|
|
switching_protocols = 101, [[HTTP status code: switching protocols]]
|
|
checkpoint = 103, [[HTTP status code: checkpoint (unofficial extension)]]
|
|
processing = 102, [[HTTP status code: processing]]
|
|
|
|
/* success: 2xx */
|
|
ok = 200, [[HTTP status code: OK]]
|
|
created = 201, [[HTTP status code: created]]
|
|
accepted = 202, [[HTTP status code: accepted]]
|
|
non_authoritative_information = 203, [[HTTP status code: non authoritative information]]
|
|
no_content = 204, [[HTTP status code: no content]]
|
|
reset_content = 205, [[HTTP status code: reset content]]
|
|
partial_content = 206, [[HTTP status code: partial content]]
|
|
multi_status = 207, [[HTTP status code: multi status]]
|
|
already_reported = 208, [[HTTP status code: already reported]]
|
|
im_used = 226, [[HTTP status code: IM used]]
|
|
|
|
/* redirection: 3xx */
|
|
multiple_choices = 300, [[HTTP status code: multiple choices]]
|
|
moved_permanently = 301, [[HTTP status code: moved permanently]]
|
|
found = 302, [[HTTP status code: found]]
|
|
see_other = 303, [[HTTP status code: see other]]
|
|
not_modified = 304, [[HTTP status code: not modified]]
|
|
use_proxy = 305, [[HTTP status code: use proxy]]
|
|
switch_proxy = 306, [[HTTP status code: switch proxy]]
|
|
temporary_redirect = 307, [[HTTP status code: temporary redirect]]
|
|
permanent_redirect = 308, [[HTTP status code: permanent redirect]]
|
|
|
|
/* client error: 4xx */
|
|
bad_request = 400, [[HTTP status code: bad request]]
|
|
unauthorized = 401, [[HTTP status code: unauthorized]]
|
|
payment_required = 402, [[HTTP status code: payment required]]
|
|
forbidden = 403, [[HTTP status code: forbidden]]
|
|
not_found = 404, [[HTTP status code: not found]]
|
|
method_not_allowed = 405, [[HTTP status code: method not allowed]]
|
|
not_acceptable = 406, [[HTTP status code: not acceptable]]
|
|
proxy_authentication_required = 407, [[HTTP status code: proxy authentication required]]
|
|
request_timeout = 408, [[HTTP status code: request timeout]]
|
|
conflict = 409, [[HTTP status code: conflict]]
|
|
gone = 410, [[HTTP status code: gone]]
|
|
length_required = 411, [[HTTP status code: length required]]
|
|
precondition_failed = 412, [[HTTP status code: precondition failed]]
|
|
payload_too_large = 413, [[HTTP status code: payload too large]]
|
|
uri_too_long = 414, [[HTTP status code: URI too long]]
|
|
unsupported_media_type = 415, [[HTTP status code: unsupported media type]]
|
|
range_not_satisfiable = 416, [[HTTP status code: range not satisfied]]
|
|
expectation_failed = 417, [[HTTP status code: expectation failed]]
|
|
misdirected_request = 421, [[HTTP status code: misdirected request]]
|
|
unprocessable_entity = 422, [[HTTP status code: unprocessable entity]]
|
|
locked = 423, [[HTTP status code: locked]]
|
|
failed_dependency = 424, [[HTTP status code: failed dependency]]
|
|
upgrade_required = 426, [[HTTP status code: upgrade required]]
|
|
precondition_required = 428, [[HTTP status code: precondition required]]
|
|
too_many_requests = 429, [[HTTP status code: too many requests]]
|
|
request_header_fields_too_large = 431, [[HTTP status code: request header fields too large]]
|
|
login_timeout = 440, [[HTTP status code: login timeout (unofficial extension)]]
|
|
no_response = 444, [[HTTP status code: no response (unofficial extension)]]
|
|
retry_with = 449, [[HTTP status code: retry with (unofficial extension)]]
|
|
blocked_by_windows_parental_controls = 450, [[HTTP status code: blocked by windows parental controls (unofficial extension)]]
|
|
unavailable_for_legal_reasons = 451, [[HTTP status code: unavailable for legal reasons]]
|
|
ssl_certificate_error = 495, [[HTTP status code: SSL certificate error (unofficial extension)]]
|
|
ssl_certificate_required = 496, [[HTTP status code: SSL certificate required (unofficial extension)]]
|
|
http_request_sent_to_https_port = 497, [[HTTP status code: HTTP request sent to HTTPS port (unofficial extension)]]
|
|
request_has_been_forbidden_by_antivirus = 499, [[HTTP status code: request has been forbidden by
|
|
anti virus]]
|
|
|
|
/* server error: 5xx */
|
|
internal_server_error = 500, [[HTTP status code: internal server error]]
|
|
not_implemented = 501, [[HTTP status code: not implemented]]
|
|
bad_gateway = 502, [[HTTP status code: bad gateway]]
|
|
service_unavailable = 503, [[HTTP status code: service unavailable]]
|
|
gateway_timeout = 504, [[HTTP status code: gateway timeout]]
|
|
http_version_not_supported = 505, [[HTTP status code: HTTP version not supported]]
|
|
variant_also_negotiates = 506, [[HTTP status code: variant also negotiates]]
|
|
insufficient_storage = 507, [[HTTP status code: insufficient storage]]
|
|
loop_detected = 508, [[HTTP status code: loop detected]]
|
|
bandwidth_limit_exceeded = 509, [[HTTP status code: bandwidth limit exceeded (unofficial extension)]]
|
|
not_extended = 510, [[HTTP status code: not extended]]
|
|
network_authentication_required = 511, [[HTTP status code: network authentication required]]
|
|
}
|
|
|
|
struct @beta Efl.Net.Http.Header {
|
|
[[An HTTP Header.
|
|
|
|
Do not assume strings are Eina_Stringshare and they may be
|
|
NULL. The key and value should not include any trailing
|
|
whitespace.
|
|
|
|
There is a special case for response headers when
|
|
"allow_redirects" is enabled, in that case
|
|
efl_net_dialer_http_response_headers_all_get() will return some
|
|
items with key being NULL, that notifies of a new request as
|
|
described in the value "HTTP/1.1 200 Ok".
|
|
]]
|
|
key: string; [[for response headers this may be null to indicate a new request response, then the value will be a line such as 'HTTP/1.1 200 Ok']]
|
|
value: string; [[Header value]]
|
|
}
|
|
|
|
error @extern @beta Efl.Net.Http.Error.BAD_CONTENT_ENCODING = "XXX"; [[HTTP error: bad content encoding]]
|
|
error @extern @beta Efl.Net.Http.Error.BAD_DOWNLOAD_RESUME = "XXX"; [[HTTP error: bad download resume]]
|
|
error @extern @beta Efl.Net.Http.Error.BAD_FUNCTION_ARGUMENT = "XXX"; [[HTTP error: bad function argument]]
|
|
error @extern @beta Efl.Net.Http.Error.CHUNK_FAILED = "XXX"; [[HTTP error: chunk failed]]
|
|
error @extern @beta Efl.Net.Http.Error.CONV_FAILED = "XXX"; [[HTTP error: conv failed]]
|
|
error @extern @beta Efl.Net.Http.Error.CONV_REQD = "XXX"; [[HTTP error: conv reqd]]
|
|
error @extern @beta Efl.Net.Http.Error.FAILED_INIT = "XXX"; [[HTTP error: failed init]]
|
|
error @extern @beta Efl.Net.Http.Error.FILE_COULDNT_READ_FILE = "XXX"; [[HTTP error: could not read file]]
|
|
error @extern @beta Efl.Net.Http.Error.FILESIZE_EXCEEDED = "XXX"; [[HTTP error: filesize exceeded]]
|
|
error @extern @beta Efl.Net.Http.Error.FUNCTION_NOT_FOUND = "XXX"; [[HTTP error: function not found]]
|
|
error @extern @beta Efl.Net.Http.Error.GOT_NOTHING = "XXX"; [[HTTP error: got nothing]]
|
|
error @extern @beta Efl.Net.Http.Error.HTTP2 = "XXX"; [[HTTP error: http2]]
|
|
error @extern @beta Efl.Net.Http.Error.HTTP2_STREAM = "XXX"; [[HTTP error: http2 stream]]
|
|
error @extern @beta Efl.Net.Http.Error.HTTP_POST_ERROR = "XXX"; [[HTTP error: http post error]]
|
|
error @extern @beta Efl.Net.Http.Error.HTTP_RETURNED_ERROR = "XXX"; [[HTTP error: http returned error]]
|
|
error @extern @beta Efl.Net.Http.Error.INTERFACE_FAILED = "XXX"; [[HTTP error: interface failed]]
|
|
error @extern @beta Efl.Net.Http.Error.LOGIN_DENIED = "XXX"; [[HTTP error: login denied]]
|
|
error @extern @beta Efl.Net.Http.Error.NO_CONNECTION_AVAILABLE = "XXX"; [[HTTP error: no connection available]]
|
|
error @extern @beta Efl.Net.Http.Error.NOT_BUILT_IN = "XXX"; [[HTTP error: not built in]]
|
|
error @extern @beta Efl.Net.Http.Error.OPERATION_TIMEDOUT = "XXX"; [[HTTP error: operation timeout]]
|
|
error @extern @beta Efl.Net.Http.Error.PARTIAL_FILE = "XXX"; [[HTTP error: partial file]]
|
|
error @extern @beta Efl.Net.Http.Error.PEER_FAILED_VERIFICATION = "XXX"; [[HTTP error: peer failed verification]]
|
|
error @extern @beta Efl.Net.Http.Error.RANGE_ERROR = "XXX"; [[HTTP error: range error]]
|
|
error @extern @beta Efl.Net.Http.Error.READ_ERROR = "XXX"; [[HTTP error: read error]]
|
|
error @extern @beta Efl.Net.Http.Error.RECV_ERROR = "XXX"; [[HTTP error: receive error]]
|
|
error @extern @beta Efl.Net.Http.Error.REMOTE_ACCESS_DENIED = "XXX"; [[HTTP error: remote access denied]]
|
|
error @extern @beta Efl.Net.Http.Error.REMOTE_DISK_FULL = "XXX"; [[HTTP error: remote disk full]]
|
|
error @extern @beta Efl.Net.Http.Error.REMOTE_FILE_EXISTS = "XXX"; [[HTTP error: remote file exists]]
|
|
error @extern @beta Efl.Net.Http.Error.REMOTE_FILE_NOT_FOUND = "XXX"; [[HTTP error: remote file not found]]
|
|
error @extern @beta Efl.Net.Http.Error.SEND_ERROR = "XXX"; [[HTTP error: send error]]
|
|
error @extern @beta Efl.Net.Http.Error.SEND_FAIL_REWIND = "XXX"; [[HTTP error: send fail rewind]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CACERT = "XXX"; [[HTTP error: SSL cacert]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CACERT_BADFILE = "XXX"; [[HTTP error: SSL cacert bad file]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CERTPROBLEM = "XXX"; [[HTTP error: SSL certproblem]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CIPHER = "XXX"; [[HTTP error: SSL cipher]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CONNECT_ERROR = "XXX"; [[HTTP error: SSL connect error]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_CRL_BADFILE = "XXX"; [[HTTP error: SSL crl bad file]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_ENGINE_INITFAILED = "XXX"; [[HTTP error: SSL engine init failed]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_ENGINE_NOTFOUND = "XXX"; [[HTTP error: SSL engine not found]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_ENGINE_SETFAILED = "XXX"; [[HTTP error: SSL engine set failed]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_INVALIDCERTSTATUS = "XXX"; [[HTTP error: SSL invalid cert status]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_ISSUER_ERROR = "XXX"; [[HTTP error: SSL issuer error]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_PINNEDPUBKEYNOTMATCH = "XXX"; [[HTTP error: SSL pinned pub key does not match]]
|
|
error @extern @beta Efl.Net.Http.Error.SSL_SHUTDOWN_FAILED = "XXX"; [[HTTP error: SSL shutdown failed]]
|
|
error @extern @beta Efl.Net.Http.Error.TOO_MANY_REDIRECTS = "XXX"; [[HTTP error: too many redirects]]
|
|
error @extern @beta Efl.Net.Http.Error.UNKNOWN_OPTION = "XXX"; [[HTTP error: unknown option]]
|
|
error @extern @beta Efl.Net.Http.Error.UNSUPPORTED_PROTOCOL = "XXX"; [[HTTP error: unsupported protocol]]
|
|
error @extern @beta Efl.Net.Http.Error.UPLOAD_FAILED = "XXX"; [[HTTP error: upload failed]]
|
|
error @extern @beta Efl.Net.Http.Error.URL_MALFORMAT = "XXX"; [[HTTP error: URL mal-formatted]]
|
|
error @extern @beta Efl.Net.Http.Error.USE_SSL_FAILED = "XXX"; [[HTTP error: usage of SSL failed]]
|
|
error @extern @beta Efl.Net.Http.Error.WRITE_ERROR = "XXX"; [[HTTP error: write error]]
|