<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>6 Nov 2017 19:43:00 Z</lastBuildDate><pubDate>4 Nov 2017 18:54:00 Z</pubDate><description>Hi,&#13;
&#13;
I'm trying to connect to a wordpress site and get a Json web token back.&#13;
&#13;
This is the code I am sending&#13;
&#13;
sURL is string="https://ardemo.agency.atlasrepublic.co/wp-json/jwt-auth/v1/token"&#13;
sUser is string="xxxxxx"&#13;
sPwd is string="xxxxxx"&#13;
&#13;
sHTTPRequest is httpRequest&#13;
&#13;
sHTTPRequest..User=sUser&#13;
sHTTPRequest..Password=sPwd&#13;
sHTTPRequest..URL=sURL&#13;
sHTTPRequest..Method=httpPost&#13;
sHTTPRequest..ContentType="application/json"&#13;
&#13;
cMyResponse is httpResponse = HTTPSend(sHTTPRequest)&#13;
IF ErrorOccurred THEN&#13;
Error(ErrorInfo(errFullDetails))&#13;
ELSE&#13;
Info(cMyResponse..Content)&#13;
END&#13;
&#13;
When I execute this I get the following error back.&#13;
&#13;
{"code":"jwt_auth_bad_auth_header","message":"Authorization header malformed.","data":{"status":403}}&#13;
&#13;
1. I have not been able to figure out how to display what the content of message being sent is so I have no what to know what teh message actually looks like. Any tips on how to trap that?&#13;
&#13;
2. The instructions for how to do this in JQuery are below. I don;t know JQuery so I'm not sure what, if anything I'm missing. Anyone know how to read this to see what, if anything I'm missing?&#13;
&#13;
$.ajax({&#13;
url: 'https://ardemo.agency.atlasrepublic.co/wp-json/jwt-auth/v1/token',&#13;
method: 'POST',&#13;
crossDomain: true,&#13;
beforeSend: function ( xhr ) {&#13;
xhr.setRequestHeader( 'Authorization', 'Basic ' + Base64.encode( 'username:password' ) );&#13;
},&#13;
success: function( data, txtStatus, xhr ) {&#13;
console.log( xhr.status );&#13;
},&#13;
error: function( error ) {&#13;
console.log( error );&#13;
}&#13;
});&#13;
&#13;
Thanks!&#13;
&#13;
Steve</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery/read.awp</link><title>HTTPRequest / connecting to Wordpress / Anybody know how to decode JQuery into Windev?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63237/read.awp</comments><pubDate>6 Nov 2017 19:43:00 Z</pubDate><description>This is what ended up working..&#13;
&#13;
&#13;
sURL is string&#13;
sURL="https://ardemo.agency.atlasrepublic.co/wp-json/jwt-auth/v1/token"&#13;
sH…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63237/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63237/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery/read.awp">HTTPRequest / connecting to Wordpress / Anybody know how to decode JQuery into Windev?</source><title>Re: HTTPRequest / connecting to Wordpress / Anybody know how to decode JQuery into Windev? (SOLVED)</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63221/read.awp</comments><pubDate>4 Nov 2017 18:57:00 Z</pubDate><description>Hi Steve,&#13;
&#13;
I don't know jquery either, but this:&#13;
Base64.encode( 'username:password' ) );&#13;
Seems to mean that you need to enco…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63221/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery-63221/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63218-httprequest-connecting-wordpress-anybody-know-how-decode-jquery/read.awp">HTTPRequest / connecting to Wordpress / Anybody know how to decode JQuery into Windev?</source><title>Re: HTTPRequest / connecting to Wordpress / Anybody know how to decode JQuery into Windev?</title></item></channel></rss>
