GithubHelp home page GithubHelp logo

basirsharif / androidrestapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dben41/androidrestapi

0.0 1.0 0.0 256 KB

This is a RESTful server implementation for my Android app. It is written in PHP, and uses MYSQL. I'm hosting it on WAMP. It accepts GET, POST, PUT, and DELETE requests. It sends and accepts responses in JSON.

PHP 100.00%

androidrestapi's Introduction

androidRestApi

This is a RESTful server implementation for my Android app. It is written in PHP, and uses MYSQL. I'm hosting it on WAMP. It accepts GET, POST, PUT, and DELETE requests. It sends and accepts responses in JSON.

User REST API Interface:  
  GET      /users 			Gets all the users  
  GET      /users/2			Retrieves a user based on primary key 
  POST     /users/login 		Send a username and password and receive a message.  
  POST     /api/users/add               Create a new user  
  PUT      /api/users/2			Updates user based on primary key  
  DELETE   /api/users/2			Deletes user based on primary key  

How to setup:

  1. Download WAMP onto your local machine.
  2. Modify the httpd.conf which is located in wamp/bin/apache/Apache2.4.4/conf. -Append this line to the end: Alias /users "c:/wamp/www/api/index.php"
  3. Create a folder and file named c/wamp/www/api/index.php
  4. Place this code in index.php. (And obviously modify it to you needs.)
  5. Restart your WAMP server. (Or start it if it's never been started.)
  6. Navigate to the URL http://localhost/quotes Note: You may need to try http://localhost:80/quotes or http://localhost:8080/quotes if your server is configured as such. You may need to reconfigure wamp to accept connections on port 8080 because Skype defaults to 80.
  7. Customize and enjoy! Use Postman to test it out.

androidrestapi's People

Contributors

dben41 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.