How to setup endOfRequestResolver for JSON RPC 2.0 Protocol

51 views
Skip to first unread message

Felix Diaz

unread,
Sep 8, 2021, 2:55:45 AM9/8/21
to mountebank-discuss
Hi,

I am trying to setup a proxy for a request to a JSON RPC 2.0 tcp protocol, however, the response is not being saved completely when the response is large.

I would like to understand how to setup a endOfRequestResolver for this protocol.
Thanks.

Thanks!

Brandon Byars

unread,
Sep 9, 2021, 8:17:22 PM9/9/21
to Felix Diaz, mountebank-discuss
Hi Felix,
Unfortunately I don't understand JSON RPC 2.0, but it feels odd to me that you'd need an endOfRequestResolver for so specific a protocol. TCP is a transport protocol that can create multiple different application protocols, so it needs the endOfRequestResolver to resolve to custom application protocols (e.g. HTTP uses, for example, the Content-Length header, but a custom protocol may use the first four bytes to record the length). 

That said, check out the isEndOfRequest function here to see how it's used for the tcp protocol. Mountebank will pass all imposter header level information to the custom protocol implementation, so if the user has defined that field, you'll have access to it.
-Brandon

--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mountebank-discuss/f0fdd3f0-5948-4e2a-a500-c50109dc603bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages