Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
5a5e0fe5
Commit
5a5e0fe5
authored
Feb 13, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove json post
parent
6943d938
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
UserScriptController.java
...n/java/nl/uva/sne/drip/api/rest/UserScriptController.java
+10
-11
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/rest/UserScriptController.java
View file @
5a5e0fe5
...
...
@@ -46,7 +46,7 @@ public class UserScriptController {
@Autowired
private
UserScriptDao
dao
;
// curl -v -X POST -F "file=@
.ssh/id_dsa.pub
" localhost:8080/drip-api/rest/user_script/upload
// curl -v -X POST -F "file=@
script.sh
" localhost:8080/drip-api/rest/user_script/upload
@RequestMapping
(
value
=
"/upload"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
String
uploadUserScript
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
JSONException
{
...
...
@@ -70,16 +70,15 @@ public class UserScriptController {
}
return
null
;
}
// curl -H "Content-Type: application/json" -X POST -d '{"key":"ssh-rsa AAAAB3NzaDWBqs75i849MytgwgQcRYMcsXIki0yeYTKABH6JqoiyFBHtYlyh/EV1t6cujb9LyNP4J5EN4fPbtwKYvxecd0LojSPxl4wjQlfrHyg6iKUYB7hVzGqACMvgYZHrtHPfrdEmOGPplPVPpoaX2j+u0BZ0yYhrWMKjzyYZKa68yy5N18+Gq+1p83HfUDwIU9wWaUYdgEvDujqF6b8p3z6LDx9Ob+RanSMZSt+b8eZRcd+F2Oy/gieJEJ8kc152VIOv8UY1xB3hVEwVnSRGgrAsa+9PChfF6efXUGWiKf8KBlWgBOYsSTsOY4ks9zkXMnbcTdC+o7xspOkyIcWjv us@u\n","name":"id_rsa.pub"}' localhost:8080/drip-api/rest/user_key/
@RequestMapping
(
method
=
RequestMethod
.
POST
)
public
@ResponseBody
String
postConf
(
UserScript
us
)
{
String
name
=
System
.
currentTimeMillis
()
+
"_"
+
us
.
getName
();
us
.
setName
(
name
);
dao
.
save
(
us
);
return
us
.
getId
();
}
// @RequestMapping(method = RequestMethod.POST)
// public @ResponseBody
// String postConf(UserScript us) {
// String name = System.currentTimeMillis() + "_" + us.getName();
// us.setName(name);
// dao.save(us);
// return us.getId();
// }
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
public
UserScript
get
(
@PathVariable
(
"id"
)
String
id
)
{
...
...
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