PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 23 → [WB 22] Get a JSON response in API rest call
[WB 22] Get a JSON response in API rest call
Débuté par Mauricio, 15 avr. 2018 18:32 - 2 réponses
Posté le 15 avril 2018 - 18:32
Hi everybody,
I need some help from some API rest gurus.

I cannot figure out yet how to get a Response in JSON format.
This is my code now:

oRequest is httpRequest
oResponse is httpResponse

oRequest..URL = "https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"
oRequest..Method = httpPost
oRequest..ContentType = "application/json"

// Request content
oRequest..Content = [
{
"test": false,
"language": "en",
"command": "GET_PAYMENT_METHODS",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
}
}
]

// Runs the request and retrieves the response
oResponse = HTTPSend(oRequest)

So "oResponse" has a property "ContentType" but this one it is ReadOnly... cannot be changed.

The result I get looks like this: https://www.screencast.com/t/tGWpVfUTF.

So I have tried this:
vResultVar is Variant = JSONToVariant(oResponse..Content)

but I get the error message:
JSONToVariant function called.
Invalid JSON format

So it seems the result it is not in JSON format .
I do not know how to indicate in my code that the result should be in JSON format. Should be something like "Accept: application/json" but I do not know where can I place this in my code if possible.

TIA.

Regards

Victoria Caballero
Costa Brava (Spain)
www.tdcsoftware.com

--
Mauricio Nicastro
www.tdcsoftware.com


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>Hi
everybody,</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>I
need some help from some API rest gurus.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>I
cannot figure out yet how to get a Response in JSON
format.<SPAN>&nbsp;</SPAN></SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>This
is my code now:</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><B
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><I>oRequest
is httpRequest<BR>oResponse is httpResponse<BR><BR>oRequest..URL =
"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"<BR>oRequest..Method
= httpPost<BR>oRequest..ContentType = "application/json"<BR><BR>// Request
content<BR>oRequest..Content = [<BR>{<BR>"test": false,<BR>"language":
"en",<BR>"command": "GET_PAYMENT_METHODS",<BR>"merchant": {<BR>"apiLogin":
"pRRXKOl8ikMmt9u",<BR>"apiKey":
"4Vj8eK4rloUd272L48hsrarnUA"<BR>}<BR>}<BR>]<BR><BR>// Runs the request and
retrieves the response<BR>oResponse = HTTPSend(oRequest)</I></B><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>So
"oResponse" has a property "ContentType" but this one it is ReadOnly... cannot
be changed.<SPAN>&nbsp;</SPAN></SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>The
result I get looks like this:<SPAN>&nbsp;</SPAN></SPAN><A
style='FONT-SIZE: 16px; TEXT-DECORATION: none; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,153); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px'
href="https://www.screencast.com/t/tGWpVfUTF" rel=nofollow
target=_blank>https://www.screencast.com/t/tGWpVfUTFstyle='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>.<SPAN>&nbsp;</SPAN></SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>So
I have tried this:</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><B
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><I>vResultVar
is Variant = JSONToVariant(oResponse..Content)</I></B><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>but
I get the error message:<SPAN>&nbsp;</SPAN></SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(255,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>JSONToVariant
function called.<BR>Invalid JSON format</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>So
it seems the result it is not in JSON format<SPAN>&nbsp;</SPAN></SPAN><IMG
title=:-( class=mod_smileys_img
style='FONT-SIZE: 16px; BORDER-TOP: medium none; FONT-FAMILY: "Times New Roman"; BORDER-RIGHT: medium none; VERTICAL-ALIGN: middle; WHITE-SPACE: normal; WORD-SPACING: 0px; BORDER-BOTTOM: medium none; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; BORDER-LEFT: medium none; ORPHANS: 2; WIDOWS: 2; MARGIN: 0px 3px; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'
alt=:-( src="

"><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>I
do not know how to indicate in my code that the result should be in JSON format.
Should be something like "Accept: application/json" but I do not know where can
I place this in my code if possible.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>TIA.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>Regards</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>Victoria
Caballero</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>Costa
Brava (Spain)</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial'>www.tdcsoftware.com--
Mauricio Nicastro
<A href="http://www.tdcsoftware.com">www.tdcsoftware.com
Posté le 15 avril 2018 - 22:11
I answer myself... I have read the help again and I figure out I could
use this in the Header property :

oRequest..Header["Accept"] = "application/json"

and it works!!


Après mûre réflexion, Mauricio a écrit :
Hi everybody,
I need some help from some API rest gurus.

I cannot figure out yet how to get a Response in JSON format. This is my code
now:

oRequest is httpRequest
oResponse is httpResponse

oRequest..URL =
"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"
oRequest..Method = httpPost
oRequest..ContentType = "application/json"

// Request content
oRequest..Content = [
{
"test": false,
"language": "en",
"command": "GET_PAYMENT_METHODS",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
}
}
]

// Runs the request and retrieves the response
oResponse = HTTPSend(oRequest)

So "oResponse" has a property "ContentType" but this one it is ReadOnly...
cannot be changed.

The result I get looks like this: https://www.screencast.com/t/tGWpVfUTF.

So I have tried this:
vResultVar is Variant = JSONToVariant(oResponse..Content)

but I get the error message: JSONToVariant function called.
Invalid JSON format

So it seems the result it is not in JSON format .
I do not know how to indicate in my code that the result should be in JSON
format. Should be something like "Accept: application/json" but I do not know
where can I place this in my code if possible.

TIA.

Regards

Victoria Caballero
Costa Brava (Spain)
www.tdcsoftware.com

--
Mauricio Nicastro
www.tdcsoftware.com


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY><SPAN style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none;
FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left;
ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>Hi
everybody,</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>I need some help from some API rest
gurus.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>I cannot
figure out yet how to get a Response in JSON
format.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>This is my
code now:</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><B
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><I>oRequest
is httpRequest<BR>oResponse is httpResponse<BR><BR>oRequest..URL =
"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"<BR>oRequest..Method
= httpPost<BR>oRequest..ContentType = "application/json"<BR><BR>// Request
content<BR>oRequest..Content = [<BR>{<BR>"test": false,<BR>"language":
"en",<BR>"command": "GET_PAYMENT_METHODS",<BR>"merchant": {<BR>"apiLogin":
"pRRXKOl8ikMmt9u",<BR>"apiKey":
"4Vj8eK4rloUd272L48hsrarnUA"<BR>}<BR>}<BR>]<BR><BR>// Runs the request and
retrieves the response<BR>oResponse = HTTPSend(oRequest)</I></B><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>So
"oResponse" has a property "ContentType" but this one it is ReadOnly...
cannot be changed.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>The result I get looks like
this:<SPAN>&nbsp;</SPAN></SPAN><A style='FONT-SIZE: 16px; TEXT-DECORATION:
none; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,153); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px'
href="https://www.screencast.com/t/tGWpVfUTF" rel=nofollow
target=_blank>https://www.screencast.com/t/tGWpVfUTFstyle='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color:
initial'>.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>So I have tried this:</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><B style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><I>vResultVar is Variant =
JSONToVariant(oResponse..Content)</I></B><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>but I get the error
message:<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR:
rgb(255,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>JSONToVariant function called.<BR>Invalid
JSON format</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>So it seems
the result it is not in JSON format<SPAN>&nbsp;</SPAN></SPAN><IMG title=:-(
class=mod_smileys_img style='FONT-SIZE: 16px; BORDER-TOP: medium none;
FONT-FAMILY: "Times New Roman"; BORDER-RIGHT: medium none; VERTICAL-ALIGN:
middle; WHITE-SPACE: normal; WORD-SPACING: 0px; BORDER-BOTTOM: medium none;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; BORDER-LEFT: medium none; ORPHANS: 2; WIDOWS: 2;
MARGIN: 0px 3px; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial' alt=:-(
src="

"><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>I do not know how to indicate in my code that
the result should be in JSON format. Should be something like "Accept:
application/json" but I do not know where can I place this in my code if
possible.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color:
initial'>TIA.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New
Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none;
FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left;
ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Regards</SPAN><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Victoria Caballero</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Costa Brava (Spain)</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>www.tdcsoftware.comid="signature"><CR>


--
Mauricio Nicastro
www.tdcsoftware.com
Posté le 16 avril 2018 - 10:21
I answer myself... I have read the help again and I figure out I could
use this in the Header property :

oRequest..Header["Accept"] = "application/json"

and it works!!

Hi everybody,
I need some help from some API rest gurus.

I cannot figure out yet how to get a Response in JSON format. This is my code
now:

oRequest is httpRequest
oResponse is httpResponse

oRequest..URL =
"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"
oRequest..Method = httpPost
oRequest..ContentType = "application/json"

// Request content
oRequest..Content = [
{
"test": false,
"language": "en",
"command": "GET_PAYMENT_METHODS",
"merchant": {
"apiLogin": "pRRXKOl8ikMmt9u",
"apiKey": "4Vj8eK4rloUd272L48hsrarnUA"
}
}
]

// Runs the request and retrieves the response
oResponse = HTTPSend(oRequest)

So "oResponse" has a property "ContentType" but this one it is ReadOnly...
cannot be changed.

The result I get looks like this: https://www.screencast.com/t/tGWpVfUTF.

So I have tried this:
vResultVar is Variant = JSONToVariant(oResponse..Content)

but I get the error message: JSONToVariant function called.
Invalid JSON format

So it seems the result it is not in JSON format .
I do not know how to indicate in my code that the result should be in JSON
format. Should be something like "Accept: application/json" but I do not know
where can I place this in my code if possible.

TIA.

Regards

Victoria Caballero
Costa Brava (Spain)
www.tdcsoftware.com




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY><SPAN style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none;
FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left;
ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>Hi
everybody,</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>I need some help from some API rest
gurus.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>I cannot
figure out yet how to get a Response in JSON
format.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>This is my
code now:</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><B
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><I>oRequest
is httpRequest<BR>oResponse is httpResponse<BR><BR>oRequest..URL =
"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi"<BR>oRequest..Method
= httpPost<BR>oRequest..ContentType = "application/json"<BR><BR>// Request
content<BR>oRequest..Content = [<BR>{<BR>"test": false,<BR>"language":
"en",<BR>"command": "GET_PAYMENT_METHODS",<BR>"merchant": {<BR>"apiLogin":
"pRRXKOl8ikMmt9u",<BR>"apiKey":
"4Vj8eK4rloUd272L48hsrarnUA"<BR>}<BR>}<BR>]<BR><BR>// Runs the request and
retrieves the response<BR>oResponse = HTTPSend(oRequest)</I></B><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>So
"oResponse" has a property "ContentType" but this one it is ReadOnly...
cannot be changed.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>The result I get looks like
this:<SPAN>&nbsp;</SPAN></SPAN><A style='FONT-SIZE: 16px; TEXT-DECORATION:
none; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,153); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px'
href="https://www.screencast.com/t/tGWpVfUTF" rel=nofollow
target=_blank>https://www.screencast.com/t/tGWpVfUTFstyle='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color:
initial'>.<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>So I have tried this:</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><B style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><I>vResultVar is Variant =
JSONToVariant(oResponse..Content)</I></B><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>but I get the error
message:<SPAN>&nbsp;</SPAN></SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR:
rgb(255,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>JSONToVariant function called.<BR>Invalid
JSON format</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>So it seems
the result it is not in JSON format<SPAN>&nbsp;</SPAN></SPAN><IMG title=:-(
class=mod_smileys_img style='FONT-SIZE: 16px; BORDER-TOP: medium none;
FONT-FAMILY: "Times New Roman"; BORDER-RIGHT: medium none; VERTICAL-ALIGN:
middle; WHITE-SPACE: normal; WORD-SPACING: 0px; BORDER-BOTTOM: medium none;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; BORDER-LEFT: medium none; ORPHANS: 2; WIDOWS: 2;
MARGIN: 0px 3px; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial' alt=:-(
src="

"><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'>.</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>I do not know how to indicate in my code that
the result should be in JSON format. Should be something like "Accept:
application/json" but I do not know where can I place this in my code if
possible.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman";
WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT:
400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2;
WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255);
TEXT-INDENT: 0px; font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><BR style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN:
left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><SPAN
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FLOAT: none; FONT-WEIGHT: 400;
COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS:
2; DISPLAY: inline !important; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color:
initial'>TIA.</SPAN><BR style='FONT-SIZE: 16px; FONT-FAMILY: "Times New
Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none;
FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal; TEXT-ALIGN: left;
ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; BACKGROUND-COLOR:
rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures: normal;
font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Regards</SPAN><BR style='FONT-SIZE: 16px;
FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px;
TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE:
normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal;
BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; font-variant-ligatures:
normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial'><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Victoria Caballero</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>Costa Brava (Spain)</SPAN><BR
style='FONT-SIZE: 16px; FONT-FAMILY: "Times New Roman"; WHITE-SPACE: normal;
WORD-SPACING: 0px; TEXT-TRANSFORM: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0);
FONT-STYLE: normal; TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING:
normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'><SPAN style='FONT-SIZE: 16px; FONT-FAMILY:
"Times New Roman"; WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM:
none; FLOAT: none; FONT-WEIGHT: 400; COLOR: rgb(0,0,0); FONT-STYLE: normal;
TEXT-ALIGN: left; ORPHANS: 2; WIDOWS: 2; DISPLAY: inline !important;
LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px;
font-variant-ligatures: normal; font-variant-caps: normal;
-webkit-text-stroke-width: 0px; text-decoration-style: initial;
text-decoration-color: initial'>www.tdcsoftware.comid="signature"><CR>


--
Mauricio Nicastro
www.tdcsoftware.com