ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ Nodejs

Nodejs Package for Developer 2025: Bemefit, Packages

Nodejs Package for Developer 2025 The benefits of Nodejs Package:  Reusability Community support Dependency management Good shareability Large selection Integration  Top NPM Packages: Express Async Lodash Cloudinary Axios Karma Molecular Grunt

HTTP for programming :HTTP Client

  HTTP Version HTTP/0.9 HTTP/1.0 HTTP/1.1 HTTP/2.0 HTTP/3.0 Type of HTTP Request/Response Client request Server response HTTP/1.1 request /response messages Request Syntax request line  Request methods OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PATCH Safe methods Idempotent methods Cacheable methods Request header fields Response Syntax Response status codes Response header fields HTTP message headers are represented       Key: Value, example HTTP message header: {    "content-length": "123",   "content-type": "text/plain",   "connection": "keep-alive",   "host": "simple.com",   "accept": "*/*"  }  Node HTTP standard module built-in Fetch API Axios Got superagent node-fetch Fetch API

EP.2 คลาสใน Typescript คืออะไร

 Class คลาสคือ รูปแบบโครงสร้างอย่างหนึ่งในการเขียนโปรแกรมที่ถูกกำหนดให้มีคุณสมบัติต่างๆ เหมือนเรามองโครงสร้างเป็นวัตถุ โดยมีทั้งคุณสมบัติ และวิธีการต่างๆ รวมอยู่ในคลาสนั้น โครงสร้าง class A {          // คุณสมบัติ   name: string;          //วิธีการ หรือการคำนวณ   methodA() { } } - class  เป็นคำสั่งประกาศว่านี่คือ class  - constructor()  เป็น method แรกที่จะถูกเรียกใช้งานเมื่อ object ของ class นี้ถูกสร้าง - method1()  เป็นตัวอย่างการประกาศ method ของ class - attr:string;  เป็นตัวอย่างการประกาศ attribute ของ class กรณีนี้ attribute มี type เป็น string