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) {
161
161
*/
162
162
public void sendResponse (Object result ) {
163
163
McpResponse mcpResponse = new McpResultResponse (mcpRequest .id (), result );
164
+ res .setContentType ("application/json" );
164
165
jsonb .toJson (mcpResponse , writer );
165
166
}
166
167
@@ -193,6 +194,7 @@ public void sendError(Exception e) throws IOException {
193
194
*/
194
195
public void sendJsonRpcException (JSONRPCException e ) {
195
196
McpResponse mcpResponse = new McpErrorResponse (mcpRequest == null ? new McpRequestId ("" ) : mcpRequest .id (), e );
197
+ res .setContentType ("application/json" );
196
198
jsonb .toJson (mcpResponse , writer );
197
199
}
198
200
You can’t perform that action at this time.
0 commit comments