I’m assuming you just want to deter people from being able to read your client/server communication in the dev console/http inspector so that they must
jump through some hoops right?
You’re basically asking how to create your own data format for client/server communication. The solution is actually the same way JSON/XML/BSON handlers are created. When you have an object in Javascript you serialize it to JSON right? Let’s say your format is called WFR. Create a javascript function that serializes/deserializes WFR and a server side implementation that processes it and responds in the same format. Easy.
2
Answers
I’m assuming you just want to deter people from being able to read your client/server communication in the dev console/http inspector so that they must
jump through some hoops right?
You’re basically asking how to create your own data format for client/server communication. The solution is actually the same way JSON/XML/BSON handlers are created. When you have an object in Javascript you serialize it to JSON right? Let’s say your format is called
WFR
. Create a javascript function that serializes/deserializesWFR
and a server side implementation that processes it and responds in the same format. Easy.I don’t know what your server side tech is, but an article like this might get you started conceptually. https://dejanstojanovic.net/aspnet/2018/september/custom-input-and-output-serializers-in-aspnet-core/
Use https and move the sensitive data to your body request/header instead of query param will solve your issue