- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
V109 #2010
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
V109 #2010
Conversation
This PR also considers the prior feedback from PR #2002 to utilize the code tag in the documentation. This was supposed to be included with my review above. |
How do I merge? it says you approved the changes, but it also says it requires approval? |
It's me who does the merge :) |
I tested the Koala test locally and it seems to be a transient error on the build server. Could it be due to request caps? Would it be a good idea to change the PostAsync to use ExecuteAsync so we could publish the responseMessage instead? Something like: const string filename = "Koala.jpg";
var path = Path.Combine(_path, "Assets", filename);
var request = new RestRequest("upload").AddFile("file", path);
var response = await _client.ExecutePostAsync<UploadResponse>(request);
var expected = new UploadResponse(filename, new FileInfo(path).Length, true);
response.Data.Should().BeEquivalentTo(expected,
$"Error making request. Data was: {JsonConvert.SerializeObject(response.Data)}.Response Status was:{response.StatusCode}. Reason: {response.ErrorMessage}");` I have the code ready to go, but I wasn't sure if there was a specific reason this test was using PostAsync rather than ExecutePost. |
I will check, it was not failing before. Weird. |
* Added .NET Framework 471 as a target. .NET 5 is out * Fix the media type issue with .NET 7 #1969 * `IRestClient` Interface is back * String type for ContentType * Added Authenticator to RestRequest * Made Options immutable to make the client thread-safe * Ignore exceptions parsing response cookies (#2015) * V109 (#2010) * Added a simple factory with opt-in --------- Co-authored-by: Francesc Castells <fcastells76@gmail.com> Co-authored-by: Francesc Castells <francesc.castells@sermo.com> Co-authored-by: Edward Lichtman <E.Lichtman2@gmail.com>
Description
Cherry-Picked Commit of pull request 2002.
Includes: Better Documentation, and some tests for reliability and self-documentation
Purpose
This pull request is a:
Checklist