mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-16 14:52:15 +01:00
Fixed bug that occurs when calling the HTTP controller's post operation
Change-Id: If356c8a8951ee98d709ab34fff984a58c4119ef8
This commit is contained in:
parent
926bae6af0
commit
186b9580e8
@ -160,13 +160,14 @@ public class HttpSBControllerImpl implements HttpSBController {
|
||||
Response response = null;
|
||||
if (payload != null) {
|
||||
try {
|
||||
response = wt.request(mediaType.getType())
|
||||
.post(Entity.entity(IOUtils.toString(payload, StandardCharsets.UTF_8), mediaType.getType()));
|
||||
response = wt.request(mediaType).post(
|
||||
Entity.entity(IOUtils.toString(payload, StandardCharsets.UTF_8), mediaType)
|
||||
);
|
||||
} catch (IOException e) {
|
||||
log.error("Cannot do POST {} request on device {} because can't read payload", request, device);
|
||||
}
|
||||
} else {
|
||||
response = wt.request(mediaType.getType()).post(Entity.entity(null, mediaType.getType()));
|
||||
response = wt.request(mediaType).post(Entity.entity(null, mediaType));
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user