I have server that can be communicate using REST api over UNIX domain socket. I want to have java application that can do POST operation on UNIX domain socket using JAVA 16 or above. But, I have no idea how i can create HTTPclient for UNIX domain socket without using third party library? Thanks in advance!
-
Do you have any idea to send POST request to server where UNIX socket is open?Prashanna Rai– Prashanna Rai2023-06-05 13:03:31 +00:00Commented Jun 5, 2023 at 13:03
-
for example, I used this part of code to make POST request on UNIX socket. But it didn't work. HttpRequest httpRequest = HttpRequest.newBuilder() .POST(HttpRequest.BodyPublishers.ofString(inputJson)) .uri(URI.create(testendpoint)) .setHeader("User-Agent", "Bot") .build();Prashanna Rai– Prashanna Rai2023-06-05 14:07:39 +00:00Commented Jun 5, 2023 at 14:07
-
If you know the answer I would appreciate your help.Prashanna Rai– Prashanna Rai2023-06-05 14:08:16 +00:00Commented Jun 5, 2023 at 14:08
-
@DuncG I need help to execute POST request on UNIX socket from JAVA applicationPrashanna Rai– Prashanna Rai2023-06-05 14:09:21 +00:00Commented Jun 5, 2023 at 14:09
-
Try to get started with a test program to download a page (from any site), then work on your post and after that edit this question with details of what you've tried and all error details (as "it didn't work" isn't helpful).DuncG– DuncG2023-06-05 14:14:32 +00:00Commented Jun 5, 2023 at 14:14
|
Show 3 more comments