cancel
Showing results for 
Search instead for 
Did you mean: 

Post request to an external server

Highlighted

Post request to an external server

Hello everyone,

I need to send some json data to an external server. I have tried to use PHP cURL or stream_context_create with file_get_contents (like in a normal php script), but they didn't work. So I have tried with different method (like Zend_Http_Client class) but without result. Anyone know how can I do it?

 

Thanks

4 REPLIES

Re: Post request to an external server

Hi @testother,

 

Can you share an example about how the endpoint needs to receive the data?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Post request to an external server

The endpoint need data json encoded. The url for the POST call is
http://serverSmiley Tongueort/TABLE_NAME

Re: Post request to an external server

Hi @testother,

 

Your module could perform a CURL call and set the data. It will depend on how you want to build your module but at the end something like that should happen.

 

(my 2 cents)

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Post request to an external server

Hi,

problem solved. My hosting blocked request with firewall