Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
SondeTest::HttpClient Class Reference

MCP client for the Streamable HTTP transport. More...

#include <testsupport.h>

Public Member Functions

 HttpClient (quint16 port)
 Creates a client for the server on 127.0.0.1:port.
QJsonObject initialize ()
 Sends initialize and stores the returned session id.
QJsonObject request (const QString &method, const QJsonObject &params={ })
 POSTs a JSON-RPC request with the session header.
HttpResponse post (const QJsonValue &body, const QList< QPair< QByteArray, QByteArray > > &extraHeaders={ })
 POSTs any JSON body with the session header.
QByteArray sessionId () const
 The session id from initialize.

Private Attributes

quint16 m_port
 Server port.
QByteArray m_session
 Mcp-Session-Id from initialize.
int m_nextId = 1
 Next request id.

Detailed Description

MCP client for the Streamable HTTP transport.


The documentation for this class was generated from the following files: