home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 19,322 of 19,505   
   Tito to All   
   sp_OAMethod   
   31 Jul 20 14:08:51   
   
   From: yosiasz@gmail.com   
      
   Greetings,   
      
   I have a need to call a rest api against a resource. It a POST and would like   
   to send the following as POST option   
      
   http.post(url,   
   '{   
       "https": { rejectUnauthorized: settings.ssl },   
   	"headers": {   
   	"Authorization": "BASIC dfsdkfdsfyduyfiuhdfiuyu5y43=",   
   	"Content-Type": "application/json",   
   	"Accept": "application/json"   
   	}   
   }'   
   )   
      
   Tried to this but it fails   
      
   EXEC @ret = sp_OAMethod @token, 'open', NULL, 'POST', @url, 'false';   
   EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Authentication',   
   @authHeader;   
   EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Content-type',   
   @contentType;   
   EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'https',   
   '{"rejectUnauthorized":"false"}';   
   EXEC @ret = sp_OAMethod @token, 'send', NULL, null;   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca