Posts

Showing posts from November, 2023

Designing API With Postman

Image
API Development Environment   Step1: Select API in postman and give api name for ex :Test Api Step 2:Go to definition and  select Author From Scratch  Use Schema : openapi: 3.0.0 info:   title: Cars API   version: 1.0.0 paths:   /cars:     get:       summary: Get a list of cars       description: Retrieve a list of cars from the database.       responses:         '200':           description: Successful response           content:             application/json:               example:                 cars:                   - id: 1                     make: Toyota                     mo...

GraphQL : Postman

Image
 What is GraphQL ? It is a query language for API  SOAP :XML RESTful:JSON GraphQL:JSON Each address represent resource in case of SOAP API  /users/john it will return all details associated with this resource Incase of RESTful api it is focused on resource based so very type of data to extract we can use different request. /users/john/address /users/john/bankaccount GraphQL :Query based approach to fetch data only one request needed to fetch needed data . Example :  query {   cars {     id     make     model     year   } } The query is requesting information about cars. Within the cars field, the query is asking for the id, make, model, and year of each car

GIT-Version Control Guide

Github :Central library (Repository) to host your code . GIT >Write commands >Github  1.Tell Git who you are  configure author name and email to be used with our commits . >git config --global user.name "xyz" >git config --global user.email "xyz@gmail.com" create some folder and put some file inside it generally your project folder . first go to that folder using cd command  >git init  this will create one .git extension file(hidden file) in that folder  you have a code  > Initialize It as Git Repositories (git init ) Staging >commit >publish to Github. For Staging : >git add *  :to add all file to staging  >git add <filename> :to add specific file to staging >git status  : to check which all file are added to staging For Commit : Commit will always take file from staging so we will always do commit after staging . >git commit -m "my first commit " connect to a remote repository  we need to conne...

REST Specific HTTP Status Codes

Introduction Anyone dealing with web technology needs to understand HTTP status codes. These three-digit codes, which a server returns to a client in response to a request, include important details regarding the request's result. We'll examine the different HTTP status codes in this blog post, which are divided into categories such as informational, success, redirection, client error, and server error answers. 1.1xx Informational: HTTP 1xx  status codes provide early warnings, indicate that the request was received, or continue the procedure. 100 Continue: The client should deliver the request body once the server has received the request headers. 101 Switching Protocols: The server has been requested to switch protocols by the requester. 102 Processing: The request is being processed by the server, but it is not yet finished. 103 Early Hints: These headers are returned before to the final HTTP message. 2.2xx Success: HTTP 2xx status codes signify that the request from the cli...