Comments (8)
@stephen-cernota I have a WIP branch for a .NET Core client that I'll add as a PR shortly. The only thing remaining is updating all of the specs to use a new HTTP mocking library. You should be able to use Execute()
with the latest version of RestSharp (106.x). RestSharp.NetCore on NuGet is an unofficial package and out of date, I would avoid using it.
from taxjar.net.
I'll try to get around to this in the very near future :-) Appreciate the feedback!
from taxjar.net.
Any updates on this?
from taxjar.net.
I found a .NET Core NuGet package for RestSharp, not sure if it is legit:
https://www.nuget.org/packages/restsharp.netcore/105.2.3
Ill report back if I get things to work
from taxjar.net.
The only problem I ran into was that this restsharp.netcore package didnt have .Execute() function and I had to use .ExecuteAsync(), Im still not fully comfortable with asynchronous functionality, please anyone help if you can, but the below code is working for me so far:
A
var resTask = GetResponseContentAsync(req);
var res = resTask.Result;
B
var res = new RestResponse();
Task.Run(async () =>
{
res = await GetResponseContentAsync(req) as RestResponse;
}).Wait();
Extra Function
Task<IRestResponse> GetResponseContentAsync(IRestRequest request)
{
var tcs = new TaskCompletionSource<IRestResponse>();
this.apiClient.ExecuteAsync(request, response => {
tcs.SetResult(response);
});
return tcs.Task;
}
from taxjar.net.
Awesome! Thank you!
from taxjar.net.
I have also written a fully async .NET Standard library for TaxJar, Claytondus.TaxJar, based on Flurl.Http. I take PRs for missing features (I am not aware of any) or bugs.
https://github.com/claytondus/Claytondus.TaxJar
from taxjar.net.
.NET Core support added in #7, releasing v2.0 shortly!
from taxjar.net.
Related Issues (20)
- Not compatible with co-existing package relying on RestSharpSigned HOT 3
- RestSharp failures swallowed silently
- Cannot specify decimal timeouts HOT 2
- Request entity examples HOT 2
- Need help with generic error troubleshooting HOT 2
- RatesForLocation chokes on EU countries HOT 2
- TaxJar not loading HOT 4
- Upgrade to latest version of RestSharp
- .Net Standard DLLs not Updated in NuGet HOT 3
- Tax to collect is always 0 no matter what the address or state is for an order HOT 1
- Async methods are ignoring 'TransactionId' property. HOT 1
- Serialization issue - RestSharp does not use Newtonsoft JsonNetSerializer by default HOT 1
- Shouldn't some properties be nullable?
- Example code
- Cannot run with Newtonsoft.Json version 13
- RestSharp dependency HOT 6
- x-api-version support? HOT 2
- Taxjar API Version
- No extensibility points (such as retry policies)
- RestSharp Method Not Found - RestSharp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taxjar.net.