Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intoinfinity-deployment
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
intoinfinity
intoinfinity-deployment
Commits
5429bda0
Commit
5429bda0
authored
Nov 07, 2021
by
Nawod Randima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4th commit
parent
c5e50a66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
README.md
README.md
+44
-1
No files found.
README.md
View file @
5429bda0
...
@@ -79,7 +79,7 @@ axios.post("http://localhost:8080/api/emp/save", newEmp)
...
@@ -79,7 +79,7 @@ axios.post("http://localhost:8080/api/emp/save", newEmp)
# request
# request
axios.get(`http://localhost:8080/api/emp/all`)
axios.get(`http://localhost:8080/api/emp/all`)
.then((response) => {
.then((response) => {
setEmployeeData(response.data.data);
setEmployeeData(response.data.data
"
);
})
})
.catch((err) => {
.catch((err) => {
alert(err);
alert(err);
...
@@ -105,3 +105,46 @@ axios.post("http://localhost:8080/api/emp/save", newEmp)
...
@@ -105,3 +105,46 @@ axios.post("http://localhost:8080/api/emp/save", newEmp)
]
]
}
}
```
```
#### 3. Update Employee
```
# request
axios.put(`http://localhost:8080/api/emp/update/`+ id, data)
.then((response) => {
alert("Employee Successfully Updated")
})
.catch((err) => {
alert(err);
});
}
# response
{
"code": 2000,
"message": "Employee Updated",
"success": true,
"data": null
}
```
#### 4. Delete Employee
```
# request
axios.delete(`http://localhost:8080/api/emp/delete/`+ id)
.then((response) => {
alert("Employee Successfully Deleted")
})
.catch((err) => {
alert(err);
});
}
# response
{
"code": 2000,
"message": "Employee Deleted",
"success": true,
"data": null
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment