Closed
Description
🐛 Bug Report
While Returning the response as content-type : application/html data is getting encoded
To Reproduce
Set the headers
header := metadata.Pairs("X-Content-Type", "application/html")
grpc.SetHeader(ctx, header)
Steps :
rpc Create (RegId) returns (Resp);
message RegId {
string id = 1;
}
message Resp {
string response = 1;
}
Above is my proto definition, in the response i am sending the <html><b> Hey Developer </b></html>
but it's retuning response as. {"response":"\u003chtml\u003e\u003cb\u003e Hey Developer \u003c/b\u003e\u003c/html\u003e"}
Expected behavior
{"response":" Hey Developer "}
And also is there is a way to return just the value as response instead of key value pair, something like this " Hey Developer "
Metadata
Metadata
Assignees
Labels
No labels