Reputation: 43
Is there any way to read http response using classes designed for web communication (for example HttpURLConnection) from file in the device memory? I need this to make easy transition to real connection with the web server, because I don't have one right now (even local).
Upvotes: 0
Views: 234
Reputation: 1007659
Is there any way to read http response using classes designed for web communication (for example HttpURLConnection) from file in the device memory?
Only by writing your own Web server.
I need this to make easy transition to real connection with the web server, because I don't have one right now (even local).
There are free Web servers available for just about every operating system in use today, including for Android itself.
That being said, create a wrapper layer around your data access, so only one class needs to know about the exact details of the data retrieval. For now, use ordinary file access from that one class.
Upvotes: 1