Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
466a083f
Commit
466a083f
authored
9 years ago
by
Mirco Nasuti
Browse files
Options
Downloads
Patches
Plain Diff
Trying to improve services proxify
parent
66a68281
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/hbp/mip/controllers/WorkflowApi.java
+15
-14
15 additions, 14 deletions
src/main/java/org/hbp/mip/controllers/WorkflowApi.java
src/test/db
+1
-1
1 addition, 1 deletion
src/test/db
with
16 additions
and
15 deletions
src/main/java/org/hbp/mip/controllers/WorkflowApi.java
+
15
−
14
View file @
466a083f
...
...
@@ -37,16 +37,13 @@ public class WorkflowApi {
if
(
algo
.
equals
(
"glr"
))
{
code
=
sendPost
(
"https://mip.humanbrainproject.eu/services/request"
,
query
,
results
);
if
(
code
!=
200
){
return
new
ResponseEntity
<>(
HttpStatus
.
valueOf
(
code
));
}
}
else
if
(
algo
.
equals
(
"anv"
))
{
results
.
append
(
"not implemented"
);
}
return
ResponseEntity
.
ok
(
results
.
toString
());
return
new
ResponseEntity
<>
(
results
.
toString
()
,
HttpStatus
.
valueOf
(
code
)
);
}
...
...
@@ -69,18 +66,22 @@ public class WorkflowApi {
int
respCode
=
con
.
getResponseCode
();
if
(
respCode
==
200
)
BufferedReader
in
=
null
;
if
(
respCode
==
200
)
{
in
=
new
BufferedReader
(
new
InputStreamReader
(
con
.
getInputStream
()));
}
else
{
BufferedReader
in
=
new
BufferedReader
(
new
InputStreamReader
(
con
.
getInputStream
()));
String
inputLine
;
StringBuilder
response
=
new
StringBuilder
();
while
((
inputLine
=
in
.
readLine
())
!=
null
)
{
response
.
append
(
inputLine
);
}
in
.
close
();
resp
.
append
(
response
.
toString
());
in
=
new
BufferedReader
(
new
InputStreamReader
(
con
.
getErrorStream
()));
}
String
inputLine
;
StringBuilder
response
=
new
StringBuilder
();
while
((
inputLine
=
in
.
readLine
())
!=
null
)
{
response
.
append
(
inputLine
);
}
in
.
close
();
resp
.
append
(
response
.
toString
());
return
respCode
;
}
...
...
This diff is collapsed.
Click to expand it.
db
@
d9f1a5cd
Subproject commit
b424b9d34d711dd90abe073a947f5069b211a261
Subproject commit
d9f1a5cde43b31469c97c2b5923ce9585685d597
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment