kenhuuu commented on PR #3334: URL: https://github.com/apache/tinkerpop/pull/3334#issuecomment-4099345520
There's a bit of a design issue with the way this is currently implemented. The `HttpRequestContext` allows for setting/getting the body, but the body is immediately serialized before the interceptors run and the only supported serializer is GraphBinary. This means that users really have no chance to modify the body at all and they can only read it, otherwise, their interceptor would need to deserialize the body, make changes and then re-serialize. In my opinion, one of two things need to be changed: - split `Auth` away from interceptors and remove Body from interceptors to make it clear that only headers can change in interceptors but Auth can read the body - Don't serialize immediately and put the body in a form that is easily modifiable, but this will require more understanding from the user about how the system works. This is effectively what the Java driver does. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
