jenius-apps / nightingale-rest-api-client

A modern, resource-efficient REST API client for Windows
https://nightingale.rest
MIT License
769 stars 36 forks source link

download api produce error #151

Closed mingkeYao closed 3 years ago

mingkeYao commented 3 years ago

when I send request to my local server for download a file , an error appear . As the picture below

image

and the log detail is below:

No valid form data items to add. Add an item or make sure all items have keys and they are enabled. at Nightingale.Core.Client.Builders.FormDataBuilder.d2.MoveNext() + 0x3c5 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb at Nightingale.Core.Client.Builders.BodyBuilder.d4.MoveNext() + 0xb02 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb at Nightingale.Core.Client.NightingaleClient.d9.MoveNext() + 0x2c9 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at Nightingale.Core.Client.NightingaleClient.d7.MoveNext() + 0x153 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at Nightingale.Core.Services.RequestSender.d__5.MoveNext() + 0x156

my local server's response header is :

Content-Type: application/octet-stream Content-Disposition: attachment; filename=xxx

mingkeYao commented 3 years ago

i am sorry , i send a get request with requestbody ,and it produces error.

maybe you can change the softwore to ignore requestbody automatically as sending a get request