- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsmcp::HttpTransport
::nsmcp::HttpTransportcreate ... \
[ -allowedOrigins (default "") ] \
[ -authenticator:required authenticator:required ] \
[ -maxBodyBytes:integer (default "65536") ] \
[ -protocol:required protocol:required ]
Defined in /usr/local/ns/tcl/nsmcp/transport.tcl
Class Relations
Methods (to be applied on instances)
maxBodyBytes (scripted, public)
<instance of nsmcp::HttpTransport> maxBodyBytes
Return the configured MCP request-body limit. The server adapter uses this bound before accepting or reading the request body.
- Returns:
- The maximum body size in bytes.
- Testcases:
- No testcase defined.
mediaTypes (scripted, public)
<instance of nsmcp::HttpTransport> mediaTypes header
Normalize a comma-separated media-type header. Ignore media-type parameters while retaining the lower-case type names used for negotiation.
- Parameters:
- header (required)
- Comma-separated media-type header value.
- Returns:
- The normalized media-type list.
- Testcases:
- No testcase defined.
questionPoll (scripted, public)
<instance of nsmcp::HttpTransport> questionPoll authorization \ server key handle
Authenticate and dispatch an administrative question poll operation. Apply the question credential policy and always clean up the temporary request context.
- Parameters:
- authorization (required)
- Authorization header supplied by the caller.
- server (required)
- Selected NaviServer virtual-server name.
- key (required)
- Administrative question-poll operation selector.
- handle (required)
- Retained job or conversation handle; ownership and expiry checks still apply.
- Returns:
- The internal HTTP response descriptor.
- Testcases:
- No testcase defined.
request (scripted, public)
<instance of nsmcp::HttpTransport> request method headers body \ server
Handle one MCP HTTP request using normalized headers. Apply origin, method, media-type, authentication and protocol checks before dispatch; clean up request-owned objects on exit.
- Parameters:
- method (required)
- MCP protocol method or HTTP method, depending on the adapter.
- headers (required)
- HTTP header dictionary using lower-case field names.
- body (required)
- Serialized HTTP or JSON-RPC request body.
- server (required)
- Selected NaviServer virtual-server name.
- Returns:
- The internal HTTP response descriptor.
- Testcases:
- No testcase defined.
response (scripted, public)
<instance of nsmcp::HttpTransport> response status body \ [ headers ]
Construct an internal HTTP response descriptor. Keep the status, serialized body and header dictionary together for the server adapter.
- Parameters:
- status (required)
- HTTP response status.
- body (required)
- Serialized HTTP or JSON-RPC request body.
- headers (optional)
- HTTP header dictionary using lower-case field names.
- Returns:
- The response dictionary with status, body and headers.
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)