OracleResponseCode Enumeration
Defines response types of Oracle.
Namespace: Neo.SmartContract.Framework.Native
Assembly: Neo.SmartContract.Framework
Syntax
Description
-
Success: success
-
ProtocolNotSupported: The protocol is not supported.
-
ConsensusUnreachable: Consensus failed.
-
NotFound: HTTP 404 request failed. The requested resource was not found on the server.
-
Timeout: HTTP 408 request timeout.
-
Forbidden: The HTTP 403 server already understands the request, but refuses to execute it.
-
ResponseTooLarge: HTTP 413 Request Entity Too Large. The server refuses to process the current request because the size of the entity submitted by the request is larger than the server is willing or able to process.
-
InsufficientFunds: system fee is insufficient.
-
Error: other errors
You need to fill in the callback function name in Oracle.Rqeuest . The order of the parameter data types of the callback function is fixed and must be string url, byte[] userData, int code, byte[] result
. The code can be judged in the contract and different logic codes can be executed. Such as: