You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 "
The text was updated successfully, but these errors were encountered:
🐛 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 "
The text was updated successfully, but these errors were encountered: