PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WebDev & WordPress
WebDev & WordPress
Iniciado por guest, 10,mar. 2018 09:59 - 2 respuestas
Publicado el 10,marzo 2018 - 09:59
Hi,
did anyone of you ever have an experience with creating a website using WordPress APIs?
Do you have any example?

Dann
Publicado el 11,marzo 2018 - 11:05
Hi
I use eHosts for my attempted web site.
I have to specify a language, PHP, Java, Eclipse and so on.
Before I use WordPress, this may be an issue for you, I hope this helps
Be safe and keep well
Peter
Publicado el 12,marzo 2018 - 17:16
Hi Dann,

We discussed it (for our WD app) with one of our clients and did enough testing to confirm that we could authenticate against the WP instance before it got put on the back burner. We'll likely pick it up again later this year.

Here is code we used to connect.

sUser is string="xxxxxx"
sPwd is string="x"

sURL is string
sURL="https://xxxxxx/wp-json/jwt-auth/v1/token"
sHTTPRequest is httpRequest
sHTTPRequest..Header["Accept"] = typeMimeJSON
sHTTPRequest..URL=sURL
sHTTPRequest..Method=httpPost
sHTTPRequest..Content="username="+sUser+"&password="+sPwd

sResponse is string

cMyResponse is httpResponse = HTTPSend(sHTTPRequest)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
sResponse=cMyResponse..Content
END
________________________

Embedded in "sResponse" is a token that you'd use in your subsequent calls to the WP endpoints to authenticate your messages.


Steve