Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Cross Domain http get request... Do I need Proxy?

Cross Domain http get request... Do I need Proxy?

Scheduled Pinned Locked Moved ASP.NET
javascriptphpcomhelptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dirso
    wrote on last edited by
    #1

    Hi, I just trying to get a result from a http get request to another domain webpage. Here is my javascript funtion for the request:

      function pegaCEP() {
          wRequest.set\_url('http://cep.republicavirtual.com.br/web\_cep.php?cep=13026075');
          wRequest.set\_httpVerb("GET");
          wRequest.add\_completed(completed);
          wRequest.invoke();
      }
    

    If I use set_url for a webpage in the same site, it works fine, otherwise it cames blank (not denied, just empty, no error). I was looking around and saw something about proxy... Do I need proxy here? If so, can you tell how to do it? If not, is there any web.config solution or something?

    Thanks, Dirso

    N V D 3 Replies Last reply
    0
    • D Dirso

      Hi, I just trying to get a result from a http get request to another domain webpage. Here is my javascript funtion for the request:

        function pegaCEP() {
            wRequest.set\_url('http://cep.republicavirtual.com.br/web\_cep.php?cep=13026075');
            wRequest.set\_httpVerb("GET");
            wRequest.add\_completed(completed);
            wRequest.invoke();
        }
      

      If I use set_url for a webpage in the same site, it works fine, otherwise it cames blank (not denied, just empty, no error). I was looking around and saw something about proxy... Do I need proxy here? If so, can you tell how to do it? If not, is there any web.config solution or something?

      Thanks, Dirso

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Here[^] is a blog post on the subject.

      Navaneeth How to use google | Ask smart questions

      1 Reply Last reply
      0
      • D Dirso

        Hi, I just trying to get a result from a http get request to another domain webpage. Here is my javascript funtion for the request:

          function pegaCEP() {
              wRequest.set\_url('http://cep.republicavirtual.com.br/web\_cep.php?cep=13026075');
              wRequest.set\_httpVerb("GET");
              wRequest.add\_completed(completed);
              wRequest.invoke();
          }
        

        If I use set_url for a webpage in the same site, it works fine, otherwise it cames blank (not denied, just empty, no error). I was looking around and saw something about proxy... Do I need proxy here? If so, can you tell how to do it? If not, is there any web.config solution or something?

        Thanks, Dirso

        V Offline
        V Offline
        Venkatesh Mookkan
        wrote on last edited by
        #3

        Have you checked wRequest.status? If it is 200 then it is OK. Else, you got error.

        Castle Rider

        What if I freeze??? Don't forget to breath...

        My: Website | Yahoo Group | Blog Spot

        D 1 Reply Last reply
        0
        • V Venkatesh Mookkan

          Have you checked wRequest.status? If it is 200 then it is OK. Else, you got error.

          Castle Rider

          What if I freeze??? Don't forget to breath...

          My: Website | Yahoo Group | Blog Spot

          D Offline
          D Offline
          Dirso
          wrote on last edited by
          #4

          It was returning 0... sadly

          Thanks, Dirso

          1 Reply Last reply
          0
          • D Dirso

            Hi, I just trying to get a result from a http get request to another domain webpage. Here is my javascript funtion for the request:

              function pegaCEP() {
                  wRequest.set\_url('http://cep.republicavirtual.com.br/web\_cep.php?cep=13026075');
                  wRequest.set\_httpVerb("GET");
                  wRequest.add\_completed(completed);
                  wRequest.invoke();
              }
            

            If I use set_url for a webpage in the same site, it works fine, otherwise it cames blank (not denied, just empty, no error). I was looking around and saw something about proxy... Do I need proxy here? If so, can you tell how to do it? If not, is there any web.config solution or something?

            Thanks, Dirso

            D Offline
            D Offline
            Dirso
            wrote on last edited by
            #5

            Thanks, guys for your attention but I decided to create a webservice, download the webpage in the webservice and call it with Ajax. It worked fine.

            Thanks, Dirso

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups