XiaoFaye / WooCommerce.NET

A .NET Wrapper for WooCommerce/WordPress REST API
MIT License
393 stars 218 forks source link

Server response 406 Not Acceptable #95

Closed lucamonaco closed 7 years ago

lucamonaco commented 7 years ago

Make sure you have included the below details when open an issue. Thank you.

XiaoFaye commented 7 years ago

What about other APIs like wc.GetProducts(), are they all getting the same error or only this one?

lucamonaco commented 7 years ago

Yes, all APIs getting the same error.

XiaoFaye commented 7 years ago

I think there is something wrong with your hosting company, can you please check with them?

lucamonaco commented 7 years ago

I opened a ticket with my hosting provider.

But using Rested (Chrome Plugin for testing REST service) with the url used from SendHttpClientRequest the APIs work fine.

http://zr17.it/wp-json/wc/v1/products?oauth_consumer_key=ck_d4ca3dc2079655d25cac92ad5eb600347112149f&oauth_nonce=b14329997d1e87cac85874c73e1044c9afe33041&oauth_signature_method=HMAC-SHA256&oauth_timestamp=1489412854&oauth_signature=mcppw5DWfTp38FKW7aiy%2B7a%2BzHP24UW7gM%2BDSuLtWl8%3D

I think there is something wrong in the httpWebRequest

XiaoFaye commented 7 years ago

The Postman works fine, not sure why the httpwebrequest will fail. Can you have a look at the below post? http://www.looogo-web.com/web-design-company-blog/wordpress-error-406-not-acceptable-this-request-is-not-acceptable-powered-by-litespeed-web-server-litespeed-technologies/

lucamonaco commented 7 years ago

Yes. Suggested tip solved the issue. Thank you Xiao Congratulatitions for yout great work.