@@ -11,6 +11,8 @@ Create Markdown Post for blog and website using Mustache Template System.
1111- Slugify for Generate SEO Friedly Filename and Slug
1212- Auto Date Generation
1313- Handlebar for HTML Template page
14+ - CSRF Token - < https://expressjs.com/en/resources/middleware/csurf.html >
15+ - axios HTTP Client for Post data
1416
1517## Development
1618
@@ -40,49 +42,7 @@ yarn start
4042http://localhost:3005/
4143```
4244
43- - Post API Example
44-
45- ``` sh
46- curl --request POST \
47- --url http://localhost:3005/ \
48- --header ' Content-Type: application/x-www-form-urlencoded' \
49- --data ' title=Example Post' \
50- --data ' postcontent=Example Post - Example Blog Post via cURL.' \
51- --data ' tag=Hello World' \
52- --data ' description=Post Content - Hello World Blog.'
53- ```
54-
55- ``` php
56- <?php
57-
58- $curl = curl_init();
59-
60- curl_setopt_array($curl, [
61- CURLOPT_PORT => "3005",
62- CURLOPT_URL => "http://localhost:3005/",
63- CURLOPT_RETURNTRANSFER => true,
64- CURLOPT_ENCODING => "",
65- CURLOPT_MAXREDIRS => 10,
66- CURLOPT_TIMEOUT => 30,
67- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
68- CURLOPT_CUSTOMREQUEST => "POST",
69- CURLOPT_POSTFIELDS => "title=Example%20Post&postcontent=Example%20Post%20-%20Example%20Blog%20Post%20via%20cURL.&tag=Hello%20World&description=Post%20Content%20-%20Hello%20World%20Blog.",
70- CURLOPT_HTTPHEADER => [
71- "Content-Type: application/x-www-form-urlencoded"
72- ],
73- ]);
74-
75- $response = curl_exec($curl);
76- $err = curl_error($curl);
77-
78- curl_close($curl);
79-
80- if ($err) {
81- echo "cURL Error #:" . $err;
82- } else {
83- echo $response;
84- }
85- ```
45+ - Post via API (SOON)
8646
8747## Modification
8848
0 commit comments