How to access the external database using the Android

Post on 21-Jan-2015

10,537 views 5 download

Tags:

description

 

transcript

How to access the external database using the Android

kewang

2

Access Model

3

GET POST PUT DELETEshow

/events/1update

/events/1destroy

/events/1index

/eventscreate

/events

edit/events/1/edit

new/events/new

RESTful Model

4

ActionControllerusing RESTful

5

CASE 1:

using org.apache.http.impl.client.DefaultHttpClient with Android

6

send HTTP request

7

HTTP 417 failed!?

8

lighttpd.access.log

9

HeaderExpect: 100-Continue!?

10

CASE 2:

using Google Chrome with Ubuntu 10.04

11

HeaderNO Expect: 100-Continue

12

lighttpd.access.log

13

development.log (Rails)

14

CASE 3:

REMOVE IT!!!

15

HeaderNO Expect: 100-Continue

16

lighttpd.access.log

17

development.log (Rails)

18

Special thanks to Michael Mayo

http://overhrd.com/?p=189