My basic question in one line is: How to validate that only diff is sent across the browser in RequestFactory?
Am stuck with that. Hope I can get it resolved.
Description:
I wrote a sample application that uses request factory and was trying to find out what difference it makes in the data that is sent over the wire. My sample screen looks like this:
Am purposefully appending the address string with a huge string and able to get a payload in KBs for the first time. But when I try to update that entity again without changing that big string, diff is calculated and that string is not shown in the P
element in Network but the data size remains the same to the previous request. I have attached those pics as well. What am in missing here?
Why is network data in chrome showing the same value as before even though the big string is not sent in the next request?
I have tried my best to explain here. Kindly ask me if anything is unclear. Thanks a lot.
I could not upload image as some issue was preventing me from uploading image. I have added the payload information of the two requests here.
An entity getting saved:-
F: "com.first.shared.ExampleApplicationRequestFactory"
I: [{P:[{T:SthgDWKGDyVU7XY2_BerXnH$ujE=, R:1, C:1}], R:[*.*], O:Gmm2HER5ETasZhvmQq72gtmtEz0=}]
O: [{T:SthgDWKGDyVU7XY2_BerXnH$ujE=, P:{,…}, C:1, R:1, O:PERSIST},…]
0: {T:SthgDWKGDyVU7XY2_BerXnH$ujE=, P:{,…}, C:1, R:1, O:PERSIST}
C: 1
O: "PERSIST"
P: {,…}
address: {T:r3GDJrFpjlkGiv5IxQq56QaH0oQ=, R:1, C:2}
detail: {T:c2QMWXl3jRvuopMBwuBwIIjIBRc=, R:1, C:3}
firstName: "lpd"
lastName: "detail example detail example detail example detail example detail example detail example detail example detail example detail example detail example detail example detail example detail example .... [and so on]"
R: "1"
T: "SthgDWKGDyVU7XY2_BerXnH$ujE="
1: {T:r3GDJrFpjlkGiv5IxQq56QaH0oQ=, P:{city:Bangalore}, C:2, R:1, O:PERSIST}
C: 2
O: "PERSIST"
P: {city:Bangalore}
R: "1"
T: "r3GDJrFpjlkGiv5IxQq56QaH0oQ="
2: {T:c2QMWXl3jRvuopMBwuBwIIjIBRc=, P:{detail:India}, C:3, R:1, O:PERSIST}
Response Headersview source
Same entity getting updated:-
F: "com.first.shared.ExampleApplicationRequestFactory"
I: [{P:[{T:SthgDWKGDyVU7XY2_BerXnH$ujE=, S:IjIi}], R:[*.*], O:Gmm2HER5ETasZhvmQq72gtmtEz0=}]
O: [{T:SthgDWKGDyVU7XY2_BerXnH$ujE=, V:MS4w, P:{firstName:lpd-2}, S:IjIi, O:UPDATE},…]
0: {T:SthgDWKGDyVU7XY2_BerXnH$ujE=, V:MS4w, P:{firstName:lpd-2}, S:IjIi, O:UPDATE}
O: "UPDATE"
P: {firstName:lpd-2}
firstName: "lpd-2"
S: "IjIi"
T: "SthgDWKGDyVU7XY2_BerXnH$ujE="
V: "MS4w"
1: {T:r3GDJrFpjlkGiv5IxQq56QaH0oQ=, V:MS4w, S:IjIi, O:UPDATE}
2: {T:c2QMWXl3jRvuopMBwuBwIIjIBRc=, V:MS4w, S:IjIi, O:UPDATE}