How to make external HTTP requests?

cancel
Showing results for 
Search instead for 
Did you mean: 
upforsin
Senior Member

How to make external HTTP requests?

Jump to solution

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 Solution

Accepted Solutions
upforsin
Senior Member

Re: How to make external HTTP requests?

Jump to solution

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 <3

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

howkymike
Alfresco Developer

View solution in original post

1 Reply
upforsin
Senior Member

Re: How to make external HTTP requests?

Jump to solution

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 <3

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

howkymike
Alfresco Developer