I am getting one POST request in my server whose payload is something like that
{ "amount": 10000,
"amount_due": 0,
"amount_paid": 10000,
"attempts": 1,
}
and content-type is application/json. Now for some calculation I want that payload in raw text something like that.
{"amount":10000,"amount_due":0,"amount_paid":10000,"attempts":1}
No space and no new line
I am using Golang and gin framework, but which I am trying to get the request body like ginCtx *gin.Context.Request.Body or ginCtx *gin.Context.GetRawData(), then I am not getting my actual desired raw data, I am getting well indented json, but I want raw body. Please help me how to get that in Golang using gin framework.