Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11575

Re: vbscript post to REST API HELP

Newsgroups microsoft.public.scripting.vbscript
Date 2017-02-23 09:10 -0800
References (1 earlier) <XnsA724EB08D5443eejj99@194.109.6.166> <3be13017-79f8-442f-9f0b-96af64b2328f@googlegroups.com> <XnsA7256E3E58F40eejj99@194.109.6.166> <308d9bc2-eeea-4ba3-aec0-0c74340c8221@googlegroups.com> <XnsA7258F7D575D6eejj99@194.109.6.166>
Message-ID <0ba28ba5-7a01-4de5-b3ff-c193007a95d2@googlegroups.com> (permalink)
Subject Re: vbscript post to REST API HELP
From Scot Needy <scotrn@gmail.com>

Show all headers | View raw


On Thursday, February 23, 2017 at 8:06:53 AM UTC-5, Evertjan. wrote:
> Scot Needy <scotrn@gmail.com> wrote on 23 Feb 2017 in
> microsoft.public.scripting.vbscript: 
> 
> > On Thursday, February 23, 2017 at 4:50:17 AM UTC-5, Evertjan. wrote:
> >> Scot Needy <scotrn@gmail.com> wrote on 23 Feb 2017 in
> >> microsoft.public.scripting.vbscript: 
> >> 
> >> > Thanks Evertjan I caught that after I posted. So many changes just to
> >> > try and get this working. 
> >> > 
> >> > Still getting 80004005 "unspecified error" I suspect it has something
> >> > to do with the Msxml2.ServerXMLHTTP methods i'm using but I'm having
> >> > trouble finding good examples. 
> >> [..] 
> >> > strJSONToSend = "{aligned_resource"": ""/device/17653"", ""message"":
> >> > ""Taskname Failed""}" 
> >> 
> >> strJSONToSend = "{""aligned_resource"":.....
> >> 
> >> But probably, that is not what thows the error.
> >> 
> >> Please start by debugging, programming in breakpoints, etc.
> >> 
> >> We should not do this testing for you.
> 
> [please do not quote signatures on usenet, signature removed]
>  
> > Your correction is not what I posted and does not address the error as
> > you stated.
> 
> > Your assuming I'm just throwing this out there without
> > debugging ? 
> 
> Well, what else could I assume 
> if you do not give the fact and the the results of your debugging. 
> 
> > I'm reaching out because I have spent the last 20+ hours
> > trying to get a simple curl one line into vbs.
> > 
> > My problem was the base64 encoded string I created it had encoded the
> > ":" and gave me 2 incorrect characters in the string. 
> 
> That is rather a different story, isn't it?
> 
> Did you give the code for that creation?
> 
> > I changed it to
> > what I captured and the code now works but needs error checking.  I
> > tried getting and example I saw to dynamically encode but failed
> > completely.
> 
> Why would it need error-checking if it works?
> 
> Please specify what error[s] you expect to catch.
> 
> > Removed credentials from the open statement and using the
> > encoded string only.
> > xmlhttp.open "POST", url, false 
> > xmlhttp.setRequestHeader "Authorization", "Basic ******encoded
> > string****" 
> > xmlhttp.setRequestHeader "Content-Type", "application/json"
> 
> > xmlhttp.send(strJSONToSend)
> > 
> > Anyone have good working example of error condition checks ?  I've tried
> > all the ones I found on Google.   
> 
> See above. 
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

Evertjan I really don't  need your condescending attitude. Pack your ego away if your here to help.  

"Why would it need error-checking if it works? "  REALLY ?    

Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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