File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
dev/io.openliberty.mcp.internal/src/io/openliberty/mcp/internal Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ public <T> T getParams(Class<T> type) {
161161 */
162162 public void sendResponse (Object result ) {
163163 McpResponse mcpResponse = new McpResultResponse (mcpRequest .id (), result );
164+ res .setContentType ("application/json" );
164165 jsonb .toJson (mcpResponse , writer );
165166 }
166167
@@ -193,6 +194,7 @@ public void sendError(Exception e) throws IOException {
193194 */
194195 public void sendJsonRpcException (JSONRPCException e ) {
195196 McpResponse mcpResponse = new McpErrorResponse (mcpRequest == null ? new McpRequestId ("" ) : mcpRequest .id (), e );
197+ res .setContentType ("application/json" );
196198 jsonb .toJson (mcpResponse , writer );
197199 }
198200
You can’t perform that action at this time.
0 commit comments