cancel
Showing results for 
Search instead for 
Did you mean: 

How to make external HTTP requests?

upforsin
Star Collaborator
Star Collaborator

Hello,

I have a server running on localhost:3000 and Docker's containers with Alfresco on localhost:8080. In the workflow Activiti process --> ServiceTask -> Java class I am trying to get HTTP request from my server. How can i accomplish that?

When I am trying to do so, it throws an error.

It might be something about Docker because when I am trying to call "curl localhost:3000" or "curl 0.0.0.0:3000" etc. from container, it also can not connect.

howkymike
Alfresco Developer
1 ACCEPTED ANSWER

upforsin
Star Collaborator
Star Collaborator

It seems it is totally not connected with Alfresco so it can be deleted.

If anyone had the same issue: (ex. trying to setup json-server)

I changed my json-server host from localhost to my ip (ex. 172.12.0.1 or 0.0.0.0 should also work) and it is working ❤️

If anyone is on Windows/Mac, you can try also host.docker.internal.

howkymike
Alfresco Developer

View answer in original post

1 REPLY 1

upforsin
Star Collaborator
Star Collaborator

It seems it is totally not connected with Alfresco so it can be deleted.

If anyone had the same issue: (ex. trying to setup json-server)

I changed my json-server host from localhost to my ip (ex. 172.12.0.1 or 0.0.0.0 should also work) and it is working ❤️

If anyone is on Windows/Mac, you can try also host.docker.internal.

howkymike
Alfresco Developer