[Question] All requests are GET, what about Post?
See original GitHub issueTL;DR: How to use POSTinstead of GET?
Thanks for your effort, really great learning experience browsing your code. But I have small question.
What I’ve noticed that all requests in GithubService are GET type. By using the abstract class NetworkBoundResource to load each object by overriding createCall() in its Repository, like UserRepository#loadUser(String login).
In Post, I update data remotely on server which I might have instance of it locally with Room, What/How to update Room depending on the API? Is the same class, NetworkBoundResource, is applicable with POST requests? What is the best scenario in this case?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top Results From Across the Web
GET vs POST - Difference and Comparison | Diffen
HTTP POST requests supply additional data from the client (browser) to the server in the message body. In contrast, GET requests include all...
Read more >Why are HTTP requests called "get" and "post"? - Stack Overflow
Get request is used to get data from server where as POST request is used to post data to server. GET requests a...
Read more >Why can't we use POST method for all requests? [closed]
As POST is not idempotent, major browser will warn you if you send twice the same POST request which is not desirable in...
Read more >Why don't we use POST for all requests and ignore GET?
GET requests are "typically" faster because of caching and the fact that POST sends more data over the wire (see also point 5...
Read more >HTTP Request Methods – Get vs Put vs Post Explained with ...
In this article, we'll be discussing the get, put, and post HTTP methods. You'll learn what each HTTP method is used for as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

NetworkBoundResources is not applicable with
POSTrequest for me. I created similar class with follow difference:Be careful! I didn’t test this code, and it may have bugs.
@dlam No i was asking about using NetworkBoundResources How can I put data in local database and post the data to server?