Skip to content

What if POST request data and GET response data are different? #252

Closed Answered by canbi
canbi asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to do this by copying the save method in the RemoteAdapter and making the following changes. If anyone has a new idea, please feel free to share, thanks.

...
final serialized = await serialize(model); // not changed
final newSerialized = {
      'data': serialized,
      'access_rule': 'all',
      'doc_id': 'abc123',
    };
final body = json.encode(newSerialized);
...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@frank06
Comment options

Answer selected by canbi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants