REST API Add

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
dtammanoon
User
Posts: 2

REST API Add

Post by dtammanoon »

It can not add data to table.

Request URL
http://localhost:5000/api/add/tblTopic

Request Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiNzg5MCIsInVzZXJpZCI6IiIsInBhcmVudHVzZXJpZCI6IiIsInVzZXJsZXZlbGlkIjotMSwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW5pc3RyYXRvciIsImV4cCI6MTY5MzM2NDIxMSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdCIsImF1ZCI6IioifQ.9bt0VZBO1OJOMbx0LkXaSb4IJgQETglogaFIqF4vrdI
User-Agent: PostmanRuntime/7.32.3
Accept: /
Postman-Token: 93a4712d-5a03-49e0-8680-ec5967713c24
Host: localhost:5000
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 75
Cookie: .AspNetCore.Antiforgery.4sKPoZjChv4=CfDJ8L9l62jIWCNDlRhkLK37yeloFe3U_vou-wvoWkbOugofSmhNPMvf2F5wcJgKiPtcUXJNSXrvlMCWBOvwhYOFK0e9cVHIMQ6lw3WhqK1GKHhEVvkjrvWBSjuV6FLVyRjN_q9eQc2rltaw-Ac9vaRzjvc; .AspNetCore.Antiforgery.WwkL1UOp9Cg=CfDJ8L9l62jIWCNDlRhkLK37yelgraFKwO6uakDIyy_Pte04lY8euj7lowN2KmdGx4_p2ZdcnwukD-sNBDzMlix-SYmagIcb8LOFDrMg6B6uieh9Fm1LECsgfyvTWNtfp-CYN6QV7TeNSmBj2f1DI5Ra28s; .AspNetCore.Antiforgery.rEIy1qN1piM=CfDJ8L9l62jIWCNDlRhkLK37yenZXT2PrkeWCYKm44U1hQhPgHMkeL9HvJPdeEHEV2nceSJybvZmTaEtwQ0hmwXYR5orIkn6KeA8A6ErG1FnUvokrpKj4WGCdDIqua7wSJ33RMFYWz_BA5_RLhe5GCS4Wfo

Request Body
{
"action":"add",
"object":"tblTopic",
"Topic": "Hi Jack"
}

Response Headers
Date: Wed, 30 Aug 2023 02:48:56 GMT
Content-Type: application/json; charset=utf-8
Server: Kestrel
Cache-Control: no-cache, no-store
Pragma: no-cache
Transfer-Encoding: chunked
Expires: -1
Last-Modified: Wed, 30 Aug 2023 09:48:56 GMT
X-UA-Compatible: IE=edge

Response Body
{"success":true,"tblTopic":{},"version":"17.0.9"}


dtammanoon
User
Posts: 2

Post by dtammanoon »

It work already.

Request Headers
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiNzg5MCIsInVzZXJpZCI6IiIsInBhcmVudHVzZXJpZCI6IiIsInVzZXJsZXZlbGlkIjotMSwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW5pc3RyYXRvciIsImV4cCI6MTY5MzM4NjU1NywiaXNzIjoiaHR0cDovL2xvY2FsaG9zdCIsImF1ZCI6IioifQ.E4GZg8SG6ZCi7P1CyLBbDNcH2ojnc3KLZSmlB2pxRWg
User-Agent: PostmanRuntime/7.32.3
Accept: /
Postman-Token: 3108c2ac-fbff-4230-9bba-faf1b6b2df6e
Host: localhost:5000
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 41
Cookie: .AspNetCore.Antiforgery.WwkL1UOp9Cg=CfDJ8L9l62jIWCNDlRhkLK37yeltGcl4XjKu26DDfOBMSZJmCovIALvrSxApB59THK31UQk9Llcc0XGZPuXtkqEXUT2_WGqXAdSjPwozpAJkq1OH1LlnUgyto9RN2Djq7uoMtrJXomcG-fBIqKxogcTjkJg

Request Body
Topic: "xPostman"
action: "add"
object: "tblTopic"

Response Headers
Content-Type: application/json; charset=utf-8
Date: Wed, 30 Aug 2023 08:59:27 GMT
Server: Kestrel
Cache-Control: no-store, no-cache, must-revalidate
Expires: -1
Last-Modified: Wed, 30 Aug 2023 15:59:27 GMT
Pragma: no-cache
Transfer-Encoding: chunked

Response Body
{"success":true,"tblTopic":{"Topic":"xPostman","id":"11"},"version":"17.0.9"}
X-UA-Compatible: IE=edge


Post Reply