Click or drag to resize

AspNetCoreRpcServerHandlerGetStatusCodeFromResponse Method

[This is preliminary documentation and is subject to change.]

Gets corresponding HTTP status code from a specific JSON-RPC response.

Namespace:  JsonRpc.AspNetCore
Assembly:  JsonRpc.AspNetCore (in JsonRpc.AspNetCore.dll) Version: 0.5.4+1bad715934a0ae5922832940ca44bbbdaa509cfe
Syntax
protected virtual int GetStatusCodeFromResponse(
	ResponseMessage response,
	int statusCodeHint
)

Parameters

response
Type: JsonRpc.MessagesResponseMessage
JSON-RPC response, or null if there is no response available (e.g. notifications).
statusCodeHint
Type: SystemInt32
suggested status code offered by the caller; usually this is 200 for JSON RPC response and 204 for notification (no response).

Return Value

Type: Int32
HTTP status code.
Remarks
Caller may hint for 307, 405, or 415 in statusCodeHint for HTTP transport errors defined in JSON-RPC 2.0 specification on HTTP transport, but implementation can change this behavior by returning a different status code.
See Also