Web Connection
Posting to a page with Httpget
Gravatar is a globally recognized avatar based on your email address. Posting to a page with Httpget
  fredkarm
  All
  Jul 21, 2024 @ 06:05pm

Trying to post to a page - works with one client,

ohttp.AddPostKey("profile_id",lcprofile)
ohttp.AddPostKey("profile_info",lcresult)
lcHTML=""
lnText=0
internet_option_ignore_offline=1
lcText=ohttp.HttpGet("https://client1/backgroundcheck.aspx" 
? ohttp.nError,ohttp.cErrorMsg </>

No error, posting done, data received at other end.

But when I try another client, they dont have a .aspx page

ohttp.AddPostKey("profile_id",lcprofile)
ohttp.AddPostKey("profile_info",lcresult)
lcHTML=""
lnText=0
internet_option_ignore_offline=1
lcText=ohttp.HttpGet("https://client2/submission" )
? ohttp.nError,ohttp.cErrorMsg

.. I get the message '12209 Connection to server cannot be established'.

Does this need a .aspx extension? Our site is not restricted by this client2. I can open up the page in a browser.

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  Rick Strahl
  fredkarm
  Jul 22, 2024 @ 06:33am

No - this has nothing to do with the extension or the platform on the server. Your Url is likely incorrect.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  fredkarm
  Rick Strahl
  Jul 22, 2024 @ 04:44pm

But I can surf to it and bring it up on the browser .. what could be the problem?

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  Rick Strahl
  fredkarm
  Jul 22, 2024 @ 06:08pm

No idea - pretty sure that's an invalid URL or you're being blocked at their firewall/network router, perhaps because you're not presenting as a browser.

The error is a network level failure, so this happens before any data is processed on the server.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  fredkarm
  Rick Strahl
  Jul 28, 2024 @ 06:33pm

I tried this on a page on our server, a simple htm page but it came up with an error 12029 Connection with server could not be established

DO WWHTTP
Ohttp=CREATEOBJECT("WWhttp")
ohttp.AddPostKey("textfield","111111")
ohttp.AddPostKey("textfield2","no results found")

*** Initialize the variables that will be filled by HTTPGetEx
lcHTML=""
lnText=0
lcText=ohttp.HttpGet("https://www.apexbackgroundcheck.com/apexmember.htm")
? ohttp.nError,ohttp.cErrorMsg</>

What could I be doing wrong.?

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  Rick Strahl
  fredkarm
  Jul 29, 2024 @ 06:09am

Can you please try to format your code correctly? I've fixed up your code blocks. Use the buttons above the editor to select and format.

That code connects for me although it fails with METHOD NOT ALLOWED (it's not a POST request?).

You have some network issue most likely. What version of Windows are you on? Could be you're on an old version that doesn't support TLS 1.2?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  Bob Roenigk
  Rick Strahl
  Jul 31, 2024 @ 10:10am

I have seen that error when my proxy server is on. The IP addresses it uses were blocked.

Gravatar is a globally recognized avatar based on your email address. re: Posting to a page with Httpget
  Rick Strahl
  Bob Roenigk
  Jul 31, 2024 @ 10:42am

Yup - that counts as a network issue.

Could be a proxy server, VPN, or more likely Anti-Virus blocking an application (like VFP or a custom application) from accessing non-widely used domains.

+++ Rick ---

© 1996-2024