1

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!

8
  • Do you have any idea to send POST request to server where UNIX socket is open? Commented 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(); Commented Jun 5, 2023 at 14:07
  • If you know the answer I would appreciate your help. Commented Jun 5, 2023 at 14:08
  • @DuncG I need help to execute POST request on UNIX socket from JAVA application Commented 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). Commented Jun 5, 2023 at 14:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.