I have a proxy that sits in between a client and a server that are communicating using json objects. The proxy needs to handle the data as a string. It has no knowledge of the types it simply needs to scan the data for strings. The problem is when I forward the data to the server from the proxy the string is quoted and the quotes in the string are escaped. I need to send the string exactly as is.
@Headers({"Accept: application/json"})
interface ExampleClient {
@Headers({"Content-Type: application/json"})
@RequestLine("POST /examples/postTest")
Response postTest(String body);
}
The string is
{"name":"Alfred","nickname":"Alfy","number":45}
but in the body of the post it is
"{\"name\":\"Alfred\",\"nickname\":\"Alfy\",\"number\":45}"
This occurs regardless of what the content type is set to.
Is there anyway I can post a string using feign without it being qouted?