Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jamiehowarth0
Copy link
Owner

No description provided.

Oren Novotny and others added 30 commits November 8, 2018 08:27
ApiResponse property ContentHeaders
Implement RFC 7807 to support Problem Details in bad validation requests
- Added IContentSerializer, JsonContentSerializer, XmlContentSerializer
- RefitSettings allows the IContentSerializer to be specified
- Refit defaults to JsonContentSerializer for back-compat
- Tests modified to exercise Json and Xml Serialization
- .NET Standard 1.4 has package dep on System.Xml.XmlSerializer
 - Added Obsolete attributes
 - Added Serialized enum as a generic replacement of JSON enum
 - Updated tests to use ContentSerializer property
 - Updated README with XML example
Conflicting PreserveAttribute when using InternalsVisibleTo
IContentSeriaizer
- all methods made async
- removed 2nd deserialize method
- type safe operation

ApiException
- Added GetContentAsAsync<T>() method
- Marked GetContentAs<T>() as obsolete
 When form encoding objects that have a property that is an IEnumerable type, use the QueryAttribute and it's CollectionFormat to determine how to encode the object.

 In general, this feature could be fleshed out much more deeply. Future work could include respecting custom formats and delimiters specified on the QueryAttribute, as well as support for collections stored in dictionaries that are form encoded.
Expand XMLDocs for QueryAttribute and CollectionFormat
- Braces on new lines
- Rename FormValueDictionary -> FormValueMultimap
- Remove FormValueMultimap indexer. This had a larger than necessary risk of being misused and introducing bugs. LINQ extensions can more expressively verify functionality in the tests.
This ought to help developers diagnose where the error occurred. The current stack trace provides no actionable information and requires going through the whole Interface searching for violations.

```
Unhandled Exception: System.ArgumentException: URL has parameter member, but no method parameter matches
   at Refit.RestMethodInfo.BuildParameterMap(String relativePath, List`1 parameterInfo) in D:\a\1\s\Refit\RestMethodInfo.cs:line 143
   at Refit.RestMethodInfo..ctor(Type targetInterface, MethodInfo methodInfo, RefitSettings refitSettings) in D:\a\1\s\Refit\RestMethodInfo.cs:line 64
   at Refit.RequestBuilderImplementation`1..ctor(RefitSettings refitSettings) in D:\a\1\s\Refit\RequestBuilderImplementation.cs:line 58
   at Refit.RequestBuilderFactory.Create[T](RefitSettings settings) in D:\a\1\s\Refit\RequestBuilderFactory.cs:line 17
   at Refit.RequestBuilder.ForType[T](RefitSettings settings) in D:\a\1\s\Refit\RequestBuilder.cs:line 24
   at Refit.RestService.For[T](HttpClient client, RefitSettings settings) in D:\a\1\s\Refit\RestService.cs:line 28
   at Refit.RestService.For[T](HttpClient client) in D:\a\1\s\Refit\RestService.cs:line 33
   at MyCode.Program.Main(String[] args) in /Users/me/Documents/MyCode/MyCode/Program.cs:line 16
```
Provide additional information during errors
 Add support for url form encoding collections
Styxxy and others added 26 commits February 13, 2019 22:16
…ash-from-hosturl

Trim trailing `/` from hostUrl
…ception-if-hosturl-isnullorwhitespace

614 should throw argumentexception if hosturl isnullorwhitespace
@jamiehowarth0 jamiehowarth0 merged commit bddddc2 into jamiehowarth0:master Feb 26, 2019
jamiehowarth0 pushed a commit that referenced this pull request Jun 5, 2019
jamiehowarth0 pushed a commit that referenced this pull request Sep 25, 2021
RefitInternalGenerated using declaration moved
jamiehowarth0 pushed a commit that referenced this pull request Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants