WooCommerce.NET
WooCommerce.NET copied to clipboard
Customer.Get("email address") returns {"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}
Make sure you have included the below details when open an issue. Thank you.
-
Wordpress version: 5.81, WooCommerce version : 5.71 and WooCommerce.NET version 0.8.3
RestAPI rest = new RestAPI( "https://example.com/wp-json/wc/v3/", "key", "secret" ); WCObject wc = new WCObject(rest); Customer customer = await wc.Customer.Get("[email protected]"); <-- error here. Console.WriteLine(customer.email); -
Details of the error message:
-
{"code":"rest_no_route",
-
"message":"No route was found matching the URL and request method.",
-
"data":{"status":404}}
is this method still valid or I did something wrong. Thanks!!!
hi
passes URLEncoded text for email use HttpUtility.UrlEncode
encode you'r text before : https://meyerweb.com/eric/tools/dencoder
but it is better than use HttpUtility.UrlEncode on nuget
I might be able to improve this in next version.