Posts

Documentation for optional interface java 8

 Follow the below java doc for optional interface ------------------------------------------------------- Optional Java 8 #optional #java optional #java8 #java 8 #optional interface #optionalInterface

Java 8 Function Interface

Java.Util.Function ------------------------ Java.Util.Function added in java 8. So let's have a closer look into it. To go through the documentation click the below link. https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html The 4 important topics are , 1. Predicate 2. Consumer   3. Function 4. Supplier A youtube example for better understanding is :  https://www.youtube.com/watch?v=Tapz6_T5oHY Consumer :  --  two methods, accept(T t) and andThen() ** accept(T t) , returns void means no thing returned. It accepts only input. **andThen executes two consumers one after another. #java #java8 #java 8 #java.util.function #javaFunction #java function #java consumer #java predicate #java supplier #java lambda expression

HTTP request and URL

Image
  An article how to moniter HTTP request in browser  ---------------------------- Let's open  TechnoCart  in a separate incognito window. Then click ctrl + shift + i . Inspect window will appear. Then in that window , click the network tab. Then refresh the web page again. As per the below image, we can see a lot of request and responses. we click each and every thing one by one, we can analyze the content of header, payload, response everything. Behind the scene  ------------------------- - When we enter a website URL, the browser creates an HTTP request for the HTML of the page, on our behalf, and sends it to the server on which the website is hosted. The HTTP response from the server is read by the browser and rendered for us beautifully as web pages instead of the raw HTML returned. Let's crack each tab ... Header :  An HTTP header is  a field of an HTTP request or response that passes additional context and metadata about the request or response ...

Asus Tough Gaming Auto Diagnosis

Image
  Open My Asus Home page and click on auto diagnosis. Issue  :  Function + increase decrease brightness was not working. Solution : Auto diagnosis ...As mentioned above.

Error Handling and HTTP status code

 Spring error Handling and HTTP status code  --------------------------- Learn HTTP Status code

REST API

Image
 REST API  API: Application program interface  API Example : If we have to search for something/calculate in google, we send a request through the HTTP to the Google server. The program resides in google server and in that place we can say that the program is API(Application Program Interface). The program (API) finds the searched value or calculate and sends it back to the requester through HTTP again. Local program -----------HTTP-------google server (Program) API History :  1999  --   SOAP -- W3C 2000 ---  REST  -- Modern way of doing APIs W3C --    SOAP SOAP   --   XML   --   RPC  This is the  SOAP  way of API call. Is REST different from This? For both, it's the same in architecture, but the difference is in Method. For SOAP, the method is always POST because it's never used whereas for REST the method contains the remote server address. Main methods used in HTTP start lin...