SlideShare a Scribd company logo
1 of 19
Download to read offline
REST that won't make you cry 
Roman Melnyk, 
Web developer, 
SoftServe 
2014
Topics to cover 
Client-server data interchange 
REST 
Lingual principles 
HTTP 
feat. pictures, marginal jokes, guns and explicit lexicon
Data handling
Lingual principles 
Yo serva, gimme sum userz, bro!
Lingual principles 
GET 127.0.0.1 /api/users
Outgoing data 
GET /api/users 
• GET /api/users/12 
• GET /api/users ?loginMask=rmel&createdAfter=2012-12-12 
POST /api/users 
• POST /api/users/12 
PUT /api/users/12 
• PUT /api/users ← sure to do this? 
DELETE /api/users/12 
• DELETE /api/users ← DONT EVEN TRY!!!1111
Outgoing data 
POST and PUT require data: 
• Content-Type: 
◦application/json 
◦application/xml 
◦multipart/form-data 
◦text/plain 
◦text/html 
◦text/xml
Incoming data 
Response code: 
• 2xx 
• 4xx 
◦400 Bad Request, 405 Method not allowed 
◦401 GTFO Unauthorized 
◦403 Forbidden 
• 5xx
Incoming data 
Headers: 
• Access-Control-Allow-Origin 
• Cache-Control, Expires, Pragma 
• Content-Encoding 
• Content-Language 
• Content-Length 
• Set-Cookie
Incoming data 
Content-Type must respect MIME types 
for both text and binary content
Incoming data 
@GET 
@Path("api/users/{id}") 
@Produces("application/json") 
public User getUserInfo( 
@PathParam("id") String uid, 
@QueryParam("filter") String filter 
) throws ApiException;
“Always code 
as If the guy who ends up 
maintaining your code 
will be a violent psychopath 
who knows where you live. 
— Martin Golding
Spend some time 
http://www.restapitutorial.com/ 
http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol 
http://www.iana.org/assignments/http-status-codes/http-status-codes. 
xhtml

More Related Content

What's hot

Spca2014 keynote johnson
Spca2014 keynote johnsonSpca2014 keynote johnson
Spca2014 keynote johnsonNCCOMMS
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012NCCOMMS
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplatesPaul Hunt
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePointTalbott Crowell
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXEnkitec
 
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...European Collaboration Summit
 
20120329 installing wordpress_3_3_1_locally
20120329 installing wordpress_3_3_1_locally20120329 installing wordpress_3_3_1_locally
20120329 installing wordpress_3_3_1_locallyDERlab
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Talbott Crowell
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Gáspár Nagy
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...European Collaboration Summit
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applicationsTalbott Crowell
 
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...European Collaboration Summit
 
Connections Migrations the easy way Soccnx10
Connections Migrations the easy way Soccnx10Connections Migrations the easy way Soccnx10
Connections Migrations the easy way Soccnx10Sharon James
 
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise ReadyEuropean Collaboration Summit
 
#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT ProsPaul Hunt
 
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...SPTechCon
 
Handling Cross-Domain calls & authentication in SharePoint 2013
Handling Cross-Domain calls & authentication in SharePoint 2013Handling Cross-Domain calls & authentication in SharePoint 2013
Handling Cross-Domain calls & authentication in SharePoint 2013BIWUG
 
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsEuropean Collaboration Summit
 
Alfresco Day Milano 2016 - Pernexas
Alfresco Day Milano 2016 - PernexasAlfresco Day Milano 2016 - Pernexas
Alfresco Day Milano 2016 - PernexasAlfresco Software
 

What's hot (20)

Spca2014 keynote johnson
Spca2014 keynote johnsonSpca2014 keynote johnson
Spca2014 keynote johnson
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
 
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
 
20120329 installing wordpress_3_3_1_locally
20120329 installing wordpress_3_3_1_locally20120329 installing wordpress_3_3_1_locally
20120329 installing wordpress_3_3_1_locally
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
 
Top 7 mistakes
Top 7 mistakesTop 7 mistakes
Top 7 mistakes
 
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
 
Connections Migrations the easy way Soccnx10
Connections Migrations the easy way Soccnx10Connections Migrations the easy way Soccnx10
Connections Migrations the easy way Soccnx10
 
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
 
#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros
 
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
 
Handling Cross-Domain calls & authentication in SharePoint 2013
Handling Cross-Domain calls & authentication in SharePoint 2013Handling Cross-Domain calls & authentication in SharePoint 2013
Handling Cross-Domain calls & authentication in SharePoint 2013
 
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
 
Alfresco Day Milano 2016 - Pernexas
Alfresco Day Milano 2016 - PernexasAlfresco Day Milano 2016 - Pernexas
Alfresco Day Milano 2016 - Pernexas
 

Similar to REST that won't make you cry

Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеSQALab
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slidesCisco DevNet
 
Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Reuven Lerner
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP TutorialLorna Mitchell
 
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Reuven Lerner
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourSoroush Dalili
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’sVisug
 
RESTful web
RESTful webRESTful web
RESTful webAlvin Qi
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentalsAgileDenver
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulnessDavid Waite
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017JoEllen Carter
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Mule soft RAML API Designing
Mule soft RAML API DesigningMule soft RAML API Designing
Mule soft RAML API DesigningRaja Reddy
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest APIBrian Layman
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API RecommendationsJeelani Shaik
 

Similar to REST that won't make you cry (20)

Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
 
Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
 
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’s
 
RESTful web
RESTful webRESTful web
RESTful web
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Rest api-basic
Rest api-basicRest api-basic
Rest api-basic
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulness
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Mule soft RAML API Designing
Mule soft RAML API DesigningMule soft RAML API Designing
Mule soft RAML API Designing
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest API
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
API ARU-ARU
API ARU-ARUAPI ARU-ARU
API ARU-ARU
 

More from IT Weekend

Quality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptanceQuality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptanceIT Weekend
 
Mobile development for JavaScript developer
Mobile development for JavaScript developerMobile development for JavaScript developer
Mobile development for JavaScript developerIT Weekend
 
Building an Innovation & Strategy Process
Building an Innovation & Strategy ProcessBuilding an Innovation & Strategy Process
Building an Innovation & Strategy ProcessIT Weekend
 
IT Professionals – The Right Time/The Right Place
IT Professionals – The Right Time/The Right PlaceIT Professionals – The Right Time/The Right Place
IT Professionals – The Right Time/The Right PlaceIT Weekend
 
Building a Data Driven Organization
Building a Data Driven OrganizationBuilding a Data Driven Organization
Building a Data Driven OrganizationIT Weekend
 
7 Tools for the Product Owner
7 Tools for the Product Owner 7 Tools for the Product Owner
7 Tools for the Product Owner IT Weekend
 
Hacking your Doorbell
Hacking your DoorbellHacking your Doorbell
Hacking your DoorbellIT Weekend
 
An era of possibilities, a window in time
An era of possibilities, a window in timeAn era of possibilities, a window in time
An era of possibilities, a window in timeIT Weekend
 
Web services automation from sketch
Web services automation from sketchWeb services automation from sketch
Web services automation from sketchIT Weekend
 
Как договариваться с начальником и заказчиком: выбираем нужный протокол общения
Как договариваться с начальником и заказчиком: выбираем нужный протокол общенияКак договариваться с начальником и заказчиком: выбираем нужный протокол общения
Как договариваться с начальником и заказчиком: выбираем нужный протокол общенияIT Weekend
 
Обзор программы SAP HANA Startup Focus
Обзор программы SAP HANA Startup FocusОбзор программы SAP HANA Startup Focus
Обзор программы SAP HANA Startup FocusIT Weekend
 
World of Agile: Kanban
World of Agile: KanbanWorld of Agile: Kanban
World of Agile: KanbanIT Weekend
 
Risk Management
Risk ManagementRisk Management
Risk ManagementIT Weekend
 
«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»IT Weekend
 
Cutting edge of Machine Learning
Cutting edge of Machine LearningCutting edge of Machine Learning
Cutting edge of Machine LearningIT Weekend
 
Parallel Programming In Modern World .NET Technics
Parallel Programming In Modern World .NET TechnicsParallel Programming In Modern World .NET Technics
Parallel Programming In Modern World .NET TechnicsIT Weekend
 
Parallel programming in modern world .net technics shared
Parallel programming in modern world .net technics   sharedParallel programming in modern world .net technics   shared
Parallel programming in modern world .net technics sharedIT Weekend
 
Maximize Effectiveness of Human Capital
Maximize Effectiveness of Human CapitalMaximize Effectiveness of Human Capital
Maximize Effectiveness of Human CapitalIT Weekend
 
“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”IT Weekend
 

More from IT Weekend (20)

Quality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptanceQuality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptance
 
Mobile development for JavaScript developer
Mobile development for JavaScript developerMobile development for JavaScript developer
Mobile development for JavaScript developer
 
Building an Innovation & Strategy Process
Building an Innovation & Strategy ProcessBuilding an Innovation & Strategy Process
Building an Innovation & Strategy Process
 
IT Professionals – The Right Time/The Right Place
IT Professionals – The Right Time/The Right PlaceIT Professionals – The Right Time/The Right Place
IT Professionals – The Right Time/The Right Place
 
Building a Data Driven Organization
Building a Data Driven OrganizationBuilding a Data Driven Organization
Building a Data Driven Organization
 
7 Tools for the Product Owner
7 Tools for the Product Owner 7 Tools for the Product Owner
7 Tools for the Product Owner
 
Hacking your Doorbell
Hacking your DoorbellHacking your Doorbell
Hacking your Doorbell
 
An era of possibilities, a window in time
An era of possibilities, a window in timeAn era of possibilities, a window in time
An era of possibilities, a window in time
 
Web services automation from sketch
Web services automation from sketchWeb services automation from sketch
Web services automation from sketch
 
Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
Как договариваться с начальником и заказчиком: выбираем нужный протокол общения
Как договариваться с начальником и заказчиком: выбираем нужный протокол общенияКак договариваться с начальником и заказчиком: выбираем нужный протокол общения
Как договариваться с начальником и заказчиком: выбираем нужный протокол общения
 
Обзор программы SAP HANA Startup Focus
Обзор программы SAP HANA Startup FocusОбзор программы SAP HANA Startup Focus
Обзор программы SAP HANA Startup Focus
 
World of Agile: Kanban
World of Agile: KanbanWorld of Agile: Kanban
World of Agile: Kanban
 
Risk Management
Risk ManagementRisk Management
Risk Management
 
«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»
 
Cutting edge of Machine Learning
Cutting edge of Machine LearningCutting edge of Machine Learning
Cutting edge of Machine Learning
 
Parallel Programming In Modern World .NET Technics
Parallel Programming In Modern World .NET TechnicsParallel Programming In Modern World .NET Technics
Parallel Programming In Modern World .NET Technics
 
Parallel programming in modern world .net technics shared
Parallel programming in modern world .net technics   sharedParallel programming in modern world .net technics   shared
Parallel programming in modern world .net technics shared
 
Maximize Effectiveness of Human Capital
Maximize Effectiveness of Human CapitalMaximize Effectiveness of Human Capital
Maximize Effectiveness of Human Capital
 
“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

REST that won't make you cry

  • 1. REST that won't make you cry Roman Melnyk, Web developer, SoftServe 2014
  • 2. Topics to cover Client-server data interchange REST Lingual principles HTTP feat. pictures, marginal jokes, guns and explicit lexicon
  • 3.
  • 5.
  • 6.
  • 7. Lingual principles Yo serva, gimme sum userz, bro!
  • 8. Lingual principles GET 127.0.0.1 /api/users
  • 9.
  • 10.
  • 11. Outgoing data GET /api/users • GET /api/users/12 • GET /api/users ?loginMask=rmel&createdAfter=2012-12-12 POST /api/users • POST /api/users/12 PUT /api/users/12 • PUT /api/users ← sure to do this? DELETE /api/users/12 • DELETE /api/users ← DONT EVEN TRY!!!1111
  • 12. Outgoing data POST and PUT require data: • Content-Type: ◦application/json ◦application/xml ◦multipart/form-data ◦text/plain ◦text/html ◦text/xml
  • 13. Incoming data Response code: • 2xx • 4xx ◦400 Bad Request, 405 Method not allowed ◦401 GTFO Unauthorized ◦403 Forbidden • 5xx
  • 14. Incoming data Headers: • Access-Control-Allow-Origin • Cache-Control, Expires, Pragma • Content-Encoding • Content-Language • Content-Length • Set-Cookie
  • 15.
  • 16. Incoming data Content-Type must respect MIME types for both text and binary content
  • 17. Incoming data @GET @Path("api/users/{id}") @Produces("application/json") public User getUserInfo( @PathParam("id") String uid, @QueryParam("filter") String filter ) throws ApiException;
  • 18. “Always code as If the guy who ends up maintaining your code will be a violent psychopath who knows where you live. — Martin Golding
  • 19. Spend some time http://www.restapitutorial.com/ http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol http://www.iana.org/assignments/http-status-codes/http-status-codes. xhtml