wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
338 stars 129 forks source link

await client.IsValidJWToken() times out - no error messages? #154

Closed toby11 closed 5 years ago

toby11 commented 5 years ago

Hi,

I am trying to connect to a fresh install of Wordpress and all functions just seem to time out - is there no error reporting in this library?

await client.IsValidJWToken()
await client.Posts.GetAll();

both just seem to hang?

I have added this into my wordpress config

define('JWT_AUTH_SECRET_KEY', 'xxx');

and going to http://mydomain.co.uk/wp-json/ returns valid json?

thanks

toby11 commented 5 years ago

(tested with 1.51 and 1.6.1 from Nuget)

ThomasPe commented 5 years ago

have you tried calling your apis manually (e.g. using Postman) to see if the endpoints all work for you? there are some cases where exceptions are thrown, but those might not cover all cases. are you able to share the link to your site?

toby11 commented 5 years ago

@ThomasPe From a fresh test install of wordpress, its now working fine - maybe was an issue with the other test site. I will investgate to see the differences between them.

thanks anyway!

ThomasPe commented 5 years ago

cool, good to hear!