Tim M
3dba936222
feat: prevent serialization of `CancellationToken?` ( #1917 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2024-11-06 22:17:20 +00:00
Tim M
a56e9d8993
feat: cache `RestMethodInfo` ( #1903 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2024-11-05 13:06:31 +00:00
Tim M
fa3a57b84d
feat: calculate path substitutions in `RestMethodInfo` ( #1897 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2024-11-03 04:03:56 +00:00
Chris Pulman
057ba9e648
Housekeeping fix some of the code analyser warnings ( #1869 )
...
* Housekeeping fix some of the code analyser warnings
* Housekeeping Fix Code warnings
2024-10-06 22:34:42 +01:00
Chris Pulman
f7f9c00bf4
Housekeeping fix some of the code analyser warnings ( #1866 )
2024-10-06 21:43:07 +01:00
Chris Pulman
483b1d8df1
Fix for CRLF injection vulnerability ( #1834 )
...
CRLF injection in Refit's [Header], [HeaderCollection] and [Authorize] attributes
2024-09-22 22:04:45 +10:00
Tim M
ea1cc52fb1
feat: optimize `RestMethodInfo`, reduce dictionary allocations and linq iterations ( #1742 )
2024-06-29 04:05:07 +04:00
Tim M
12640cb4a5
feat: refactors, cache attributes, use helper methods ( #1739 )
2024-06-27 00:11:03 +04:00
Tim M
03d7bbc7ab
feat: use `TryGetSingle` instead of collection enumerable to lists. ( #1738 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2024-06-25 18:36:50 +00:00
Tim M
dcb9da28de
feat: run csharpier ( #1715 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2024-06-14 06:32:26 +00:00
Chris Pulman
56b82ac674
Update Net 8 Support to use Netx.x instead of Nestandard2.1 ( #1703 )
...
Remove Net 7.0
2024-05-27 17:27:02 +10:00
Chris Pulman
aa78fc08b1
Housekeeping Update tests to remove need for comments ( #1697 )
...
* Housekeeping Update tests to remove need for comments
* Reduce unnecessary warnings
2024-05-24 10:15:52 +10:00
Tim M
2dff048afa
housekeeping: run csharpier ( #1617 )
2023-11-27 09:50:46 +11:00
Tim M
cb9a5b7f64
chore: remove unused using statements ( #1618 )
...
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
2023-11-21 00:59:29 +00:00
Ani Betts
e4a3565c85
Revert #1418 , #1367 , introduce public version of RestMethodInfo ( #1496 )
...
* Revert "feature: Add named httpclient support (#1418 )"
This reverts commit b78bbc79dd
.
* Revert "Feature: allow developers to inject the MethodInfo as a Property (#1367 )"
This reverts commit b06ef7c37d
.
* no
* Make RestMethodInfo internal
* Implement a public RestMethodInfo
* Reenable RestMethodInfo, but our public one instead
amend
* Allow configuring the HttpClient name
* Fix typo
2023-05-14 08:18:55 -04:00
Bar Levy
c8888e12d7
Fix condition of method return type in RequestBuilder to only allow Task<> and IObservable<> ( #1364 )
...
* Fix condition of generic return type in method info
* add test
* Update RestMethodInfo.cs
---------
Co-authored-by: barle <barle@users.noreply.github.com>
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-13 10:00:34 +10:00
Chris Pulman
098c4e327d
housekeeping: Update Targets, Fix build, Update relevant packages ( #1488 )
...
* Update Targets, Fix build, Update relevant packages
* Fix newly added tests from merge
---------
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
2023-04-12 17:30:13 +10:00
Douglas K Smith
397ada2350
Fix parenthesis bug in IsApiResponse expression, which caused IApiResponse-returning methods to throw ApiException on error, rather than assigning the exception to IApiResponse.Error
2022-01-15 13:03:27 +01:00
James Tayler
284c36f00d
Merge branch 'main' into header_collection_post_without_body_bug
2021-03-20 23:37:33 +13:00
James Tayler
0e939aec32
skip Property parameters when inferring Body
2021-03-19 23:48:01 +13:00
James Tayler
85672607e9
skip HeaderCollection when inferring Body
2021-03-19 23:29:18 +13:00
Valentin Bornand
03e4395ca7
Buffered JsonContent when Body(buffered:true)
...
Fix inconsistency with RefitSettings.Buffered setting.
2021-03-11 21:29:51 +01:00
Claire Novotny
26c70c0347
Ensure we don't try to add the same parameter index to the mapping table more than once
2021-02-04 12:04:02 -05:00
James Tayler
ab87651019
Merge branch 'main' into support_dynamic_header_dictionary
2020-11-30 23:14:13 +13:00
James Tayler
7f3d94f2a1
enforce IDictionary<string, string> semantics on HeaderCollection parameter
2020-11-29 17:50:20 +13:00
James Tayler
4e6f0ab9ee
enforce supported semantics test wip
2020-11-28 23:57:51 +13:00
James Tayler
5bf6045eac
test header collection works with query and property attributes
2020-11-28 23:44:24 +13:00
James Tayler
8e7f585ccb
a request can only have one HeaderCollection
2020-11-28 23:21:44 +13:00
James Tayler
8c3f46dece
add support for header collection
2020-11-28 00:16:00 +13:00
James Tayler
0d69134c3b
add first failing test
2020-11-26 23:26:12 +13:00
Claire Novotny
fc263f9da9
First pass at NRT annotations
2020-11-25 16:52:50 -05:00
Claire Novotny
c1cd95f5d1
Code analysis clean up
2020-11-25 11:43:21 -05:00
James Tayler
7d494faa87
support defaulting property key if no key specified
2020-11-23 11:35:51 +13:00
James Tayler
b049878f3d
populate RequestProperty into HttpRequestMessage.Properties
2020-11-22 21:22:14 +13:00
James Tayler
e96bf3a06b
add failing test
2020-11-22 14:34:01 +13:00
Valentyn Barsehian
9ca707423a
fix [BUG] AuthorizeAttribute does not add a header to the request #946
2020-10-06 12:48:18 +03:00
Alexey I.m2strng4dtwrld
0d7ac3a847
refactor: change verify url method exception message
2020-07-02 00:48:46 +03:00
Sergio Pedri
c00bfd1b52
Merge branch 'master' into feature/system-text-json
2020-03-22 13:25:36 +01:00
Claire Novotny
d3aabec32b
Merge branch 'master' into master
2020-03-21 11:31:45 -04:00
Sergio Pedri
b70e4918fb
Removed unnecessary using directives
2020-02-10 14:21:38 +01:00
faviann
4a075400e6
Refactor to bring back type safety without boxing of deserialized content
...
This small refactor brought technically 3 bonuses
1) Removed boxing of deserialize value to return T and keeping type safety (yeah)
2) Much less intrusive implementation of ApiResponse by reducing the constant branching
3) Adds Supports RestMethodInfos with a Task<IApiResponse>
2020-01-24 11:22:54 -05:00
faviann
b38e4ce881
Refactored Type handling for RestMethodInfo
...
Refactored the various type handling to make it more clear as to:
1 - What type is returned by the RestMethodInfo
2 - What type is the result of the Task/Observable of the RestMethodInfo
3 - What type is to be deserialized during the Request
With the easier type handling we'll be able to refactor to avoid boxing during the deserialization in `RequestBuilderImplementation.BuildCancellableTaskFuncForMethod`
2020-01-24 11:22:54 -05:00
nathan.hart.91 outlook.com
e39014d9e1
Fix for #802 casing bug on object bound to url
2019-12-04 10:03:50 -06:00
nathan.hart.91 outlook.com
fc3ce42011
Syncing with upstream and resolving conflicts
2019-11-12 12:24:51 -06:00
Oren Novotny
6fa6a49ffc
Code cleanup
2019-10-30 15:55:05 -04:00
Oren Novotny
4fdd8c525b
Fix test failures and add additional test for poco
2019-10-30 15:53:14 -04:00
Oren Novotny
c24b9ddb37
Ensure query parameter map is keyed by parameter index
2019-10-30 13:25:16 -04:00
Oren Novotny
db101f182e
Enable use of AliasAs for multipart item name
2019-10-30 13:10:01 -04:00
Oren Novotny
4c6dc1fade
Fix for primitive types with Query attribute
2019-10-30 12:32:22 -04:00
nathan.hart.91 outlook.com
4b60a5816b
Prefix the route attributes with the object name
2019-10-07 10:21:38 -05:00