I sort of solved the problem
The problem was with Content-Type: chunked. For some reason, when the response was responding from a POST request chunked would only send the first chunk and end. I checked this by routing the GET request to the same controller action and manually adding in working parameters and the liquid displayed as it should.
I fixed this by setting
config.middleware.use Rack::ContentLength
in the application.rb file
I don't know where the real problem lies but hopefully this post helps someone in the future.