0

I have a javascript code that calls a web service from another server, it's working, but i need to call it from code behind due to an http call request issue, following my code :

      $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "http://10.8.111.12:7181/CatchEventLink.asmx/CollectDataLink",
            data: JSON.stringify({ "pDataDictionnary": lDataCollected }),
            dataType: "json",
            async: true,
            success: function (data, textStatus) {
                if (textStatus == "success") {
                    //alert('success');
                }
            },
            error: function (exception) {
                //alert('Exeption : ' + exception);
            }
        });

Any suggestions please??

anass 90
  • 125
  • 1
  • 2
  • 14
  • http://stackoverflow.com/questions/4015324/http-request-with-post – Mahdi Oct 04 '16 at 08:58
  • what is "from code behind" and "call request issue"? – Maxx Oct 04 '16 at 08:58
  • @Maxx his tag has c# so I'm assuming it's c#, there is the HttpRequest object that should be able to mimic jquery's ajax. – Keith Oct 04 '16 at 09:00
  • @Maxx From code behind it's c#, after i deployed the solution in another environment i had an http call issues because im using http and the other server is on https so i decided to find a way to call the web service from the server side not the client side – anass 90 Oct 04 '16 at 09:02

0 Answers0