Agenda

1.What is an api

Api refers to application programming interface

It is a set of subroutine definitations, protocols and tools for building application software.

It helps in connecitng various software components

An api make it easier for developers to use certain technologies in building applications by using certain predefined operations.

2.Introduciton to Rest Framework

  • It describe an architecture which stands for REpresentaionl State Transfer
  • It is used for web based architecture for data communication
  • It uses HTTP to make calls between machines

The following HTTP methods are most commonly used in a REST based architecture:

GET records and retrieve the data

PUT is used to change the state or update a resources which can be a file it can be object or any block

POST is usually used to create the resources

DELETE is used to remove that resource

3.What is REST API?

  • When Web Service use REST architecture, they are called RESTFul APIs or REST APIs.

  • A REST API is a set of web addresses that respond with pure information, not a formatted web pge

  • An api returens json, which is a common format. You'll see all of information surrounded with quotation marks, {} ,[] and descriptive titles for each bit of info.

4.Demo-Create a Restful api

Open the terminal and type the following command for Django installation

pip install djangorestframework
python manage.py makemigrations
python manage.py migrate

Create a user

run server:

python manage.py runserver

References:

Video Django Rest Framework | How to Create a RESTful API Using Django | Django Tutorial | Edureka

最新文章

  1. 为IEnumerable<T>添加RemoveAll<IEnumerable<T>>扩展方法--高性能篇
  2. android中接口和抽象类的区别
  3. Android下载更新代码
  4. oc程序编译【-framework Foundation 编译】
  5. javaSE之如何将一个文档显示出来(,txt,.doc,.....)
  6. 截获控制台程序关闭事件(SetConsoleCtrlHandler)
  7. bzoj1190
  8. android程序启动画面之Splash总结[转]
  9. Function.prototyoe.call.apply
  10. selenium3.x 踏坑记
  11. 03 CheckBox 复选框
  12. Unity编辑器扩展-Custom List, displaying data your way
  13. maven插件运行过程中自动执行sql文件
  14. 中级 jQuery 了解
  15. [spark] spark 特性、简介、下载
  16. phpstorm 初体验
  17. 【RF库Collections测试】Remove From List
  18. ftp.GetResponse() 无法连接到远程服务器
  19. sourceinsight - imsoft.cnblogs
  20. Jenkins进阶-发布后自动创建git tag(5)

热门文章

  1. OpenCV.Net基于傅里叶变换进行文本的旋转校正
  2. HighChat动态绑定数据 数据后台绑定(四)
  3. mysql数据库被攻击
  4. python网络编程-1
  5. 在使用 Fortify进行源码扫描时需要做对项目需要做什么?
  6. Python3的sorted
  7. AutoLayout的使用
  8. Telegram Android源码问题汇总 持续更新
  9. python从入门到放弃之守护进程
  10. Django restframework 序列化之 ModelSerializer 小记