Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11580
| Newsgroups | microsoft.public.scripting.vbscript |
|---|---|
| Date | 2017-02-23 20:03 -0800 |
| References | <ee2f9787-86db-422c-b0ee-7b4b47b8c070@googlegroups.com> <XnsA724EB08D5443eejj99@194.109.6.166> <3be13017-79f8-442f-9f0b-96af64b2328f@googlegroups.com> <1ae350da-815f-48ab-a5ac-0b17c83de172@googlegroups.com> <ugs2rxcjl132$.1lt4szfpq1s4x.dlg@40tude.net> |
| Message-ID | <9cef2324-37a3-496b-b694-710d2adcf279@googlegroups.com> (permalink) |
| Subject | Re: vbscript post to REST API HELP |
| From | Scot Needy <scotrn@gmail.com> |
On Thursday, February 23, 2017 at 8:20:20 PM UTC-5, JJ wrote:
> On Wed, 22 Feb 2017 21:22:34 -0800 (PST), Scot Needy wrote:
> > So I changed to http and ran some tcpdumps on the webserver side.
> >
> > The POST is getting sent but for some reason the vbscript is getting a 404.
>
> You should provide an actual working URL, because the URL that you've
> provided points to a non existant resource in the server.
>
> http://testsitename.com/api/alert
>
> Will always result to HTTP code 404. Whether a credential is given or not.
Yea JJ but I needed to modify the real values to be somewhat anonymous besides the actual URL is on private ip space and DNS. Would not have helped in a public forum.
Glad to say I have my simple post working after gutting it of any fluff. Now I need to add it back in but really wasn't sure it was working right in the first place which is why I posted an open question about logical error checking.
To me, the first two places something like this would fail on is authorization or error from open or send methods. Also I still don't understand if/how this works. Seems like there should be more.
Set objXmlHttpMain = CreateObject("Msxml2.XMLHTTP")
on error resume next
Seems like vbs using Msxml2 is pretty rare from google searches so I'm just trying to piece it together from search results.
Going to start looking at these examples to start. I'm sure I'll get stuck along the lines.
https://coderwall.com/p/ljvj-g/unlikely-coding-a-vbscript-posting-to-a-rest-api
http://stackoverflow.com/questions/26956256/how-to-post-json-data-via-http-api-using-vbscript
http://stackoverflow.com/questions/24863986/vbscript-msxml12-xmlhttp-error-handling
This site had a pretty good breakdown of XmlHttp
http://www.c-amie.co.uk/technical/javascript-serverxmlhttp-emulation/
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
vbscript post to REST API HELP scotrn@gmail.com - 2017-02-22 12:17 -0800
Re: vbscript post to REST API HELP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-22 23:06 +0100
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-22 17:14 -0800
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-22 21:22 -0800
Re: vbscript post to REST API HELP JJ <jj4public@vfemail.net> - 2017-02-24 08:20 +0700
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-23 20:03 -0800
Re: vbscript post to REST API HELP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-23 10:50 +0100
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-23 04:54 -0800
Re: vbscript post to REST API HELP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-23 14:06 +0100
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-23 09:10 -0800
Re: vbscript post to REST API HELP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-23 20:02 +0100
Re: vbscript post to REST API HELP "Mayayana" <mayayana@invalid.nospam> - 2017-02-23 17:19 -0500
Re: vbscript post to REST API HELP Scot Needy <scotrn@gmail.com> - 2017-02-23 19:32 -0800
Re: vbscript post to REST API HELP "Mayayana" <mayayana@invalid.nospam> - 2017-02-23 23:07 -0500
Re: vbscript post to REST API HELP "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-24 09:17 +0100
Re: vbscript post to REST API HELP "Mayayana" <mayayana@invalid.nospam> - 2017-02-24 10:22 -0500
Re: vbscript post to REST API HELP davidjsmith10@gmail.com - 2020-01-13 09:15 -0800
csiph-web