Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Bad request Error on Click #2

Closed
WillStrohl opened this issue Sep 8, 2020 · 0 comments
Closed

400 Bad request Error on Click #2

WillStrohl opened this issue Sep 8, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@WillStrohl
Copy link
Contributor

WillStrohl commented Sep 8, 2020

I'm able to get this working using Postman super-easy. I can use JS too, but that requires CORS. This module does the service call server-side, but I think I'm missing something super-obvious.

CloudFlare API Endpoint: https://api.cloudflare.com/#zone-purge-all-files

2020-09-08 17:51:25.664-04:00 [SERVERNAME][D:8][T:108][ERROR] Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper - 
	The remote server returned an error: (400) Bad Request. System.Net.WebException: The remote server returned an error: (400) Bad Request.
	at System.Net.HttpWebRequest.GetResponse()
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendRequest(String serviceUrl, String method, String data, String contentType, Dictionary`2 customHeaders, WebProxy proxy, Int32 timeout) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 167
2020-09-08 17:51:25.680-04:00 [SERVERNAME][D:8][T:108][ERROR] Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper - 
	Error SendRequest: The remote server returned an error: (400) Bad Request. System
	System.ArgumentException: Error SendRequest: The remote server returned an error: (400) Bad Request. System
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendRequest(String serviceUrl, String method, String data, String contentType, Dictionary`2 customHeaders, WebProxy proxy, Int32 timeout) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 177
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendWithData[T](String uri, String method, String data, String contentType, Dictionary`2 customHeaders) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 82
2020-09-08 17:51:25.680-04:00 [SERVERNAME][D:8][T:108][DEBUG] Upendo.Modules.CloudFlareClearCache.Services.CloudFlareController - 
	Upendo.Modules.CloudFlareClearCache.Services.ServiceResponse`1[Upendo.Modules.CloudFlareClearCache.Models.CloudFlareResponse]
2020-09-08 17:51:25.680-04:00 [SERVERNAME][D:8][T:108][ERROR] Upendo.Modules.CloudFlareClearCache.Services.CloudFlareController - 
	EXCEPTION: Error SendRequest: The remote server returned an error: (400) Bad Request. System |    
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendRequest(String serviceUrl, String method, String data, String contentType, Dictionary`2 customHeaders, WebProxy proxy, Int32 timeout) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 177
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendWithData[T](String uri, String method, String data, String contentType, Dictionary`2 customHeaders) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 82
	System.Exception: EXCEPTION: Error SendRequest: The remote server returned an error: (400) Bad Request. System |    
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendRequest(String serviceUrl, String method, String data, String contentType, Dictionary`2 customHeaders, WebProxy proxy, Int32 timeout) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 177
	at Upendo.Modules.CloudFlareClearCache.Services.ServiceHelper.SendWithData[T](String uri, String method, String data, String contentType, Dictionary`2 customHeaders) 
	in C:\Work\DNN.Modules\CloudFlareCache\Modules\CloudFlareClearCache\Services\ServiceHelper.cs:line 82

image
image

@WillStrohl WillStrohl added bug Something isn't working help wanted Extra attention is needed labels Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant