vin-decoder

FREEMIUM
Par Jason | Mise à jour vor 17 Tagen | Data
Popularité

9.7 / 10

Latence

181ms

Niveau de service

96%

Health Check

N/A

Retour à toutes les discussions

Migrant code to sql sp_oamethod

Rapid account: Cmmlb 2010
cmmlb2010
vor 4 Jahren

I’m converting the code into json using sql sp_OAMethod

Here is the code:

EXEC @ret = sp_OACreate ‘MSXML2.ServerXMLHTTP’, @token OUT
SET @url = ‘https://vindecoder.p.rapidapi.com/decode_vin?vin=4F2YU09161KM33122’;

EXEC @ret = sp_OAMethod @token, ‘Open’, null, ‘post’, @url, ‘false’

EXEC @ret = sp_OAMethod @token, ‘setRequestHeader’, NULL,‘x-rapidapi-host’, 'vindecoder.p.rapidapi.com
EXEC @ret = sp_OAMethod @token, ‘setRequestHeader’, NULL,‘x-rapidapi-key’, '<<fill api key>>'
EXEC @ret = sp_OAMethod @token, ‘setRequestHeader’, NULL, ‘Content-Type’, @contentType;
EXEC @ret =sp_OAMethod @token, ‘get’, @JSON OUTPUT

Everything ok till last instruction

What am i doing wrong

Assistence will be much apreciated

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires