Multiple Query string parameters #251
Replies: 2 comments 14 replies
-
What exactly throws the exception? Does RestEase throw is, or does the server respond with an error? Note that RestEase by default serializes objects in query strings by calling |
Beta Was this translation helpful? Give feedback.
-
One more question please i want to impelement interface with specific logic , in such sutiotion how can i register this interface and class that implements it here : public class CreateAndUpdateOrganization : ICreateAndUpdateOrganization
{
public async Task<int> CreateClient([Body] CreateClientCommand command, CancellationToken cancellationToken)
{
using var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);
var organizationApi = RestClient.For<ICreateAndUpdateOrganization>("http:someadresss");
var clientId = await organizationApi.CreateClient(command, cancellationToken);
var accountingApi = RestClient.For<IAccountPlan>("http://http:someadresss");
var accountPlanItem = new CreateAccountPlanItemCommand
{
ParentAccountPlanItemId = command.ParentAccountPlanItemId,
AccountPlanItemCode = "must be generated",
AccountPlanItemClassId = 3,
Name = command.Name,
CurrencyId = 1,
AccountPlanItemTypeId = 1,
AccountPlanItemCategoryId = 1,
IsAccountPlanItemClosed = false
};
await accountingApi.CreateAccountPlanItem(accountPlanItem, cancellationToken);
scope.Complete();
return clientId;
} |
Beta Was this translation helpful? Give feedback.
-
Hello, it seem restease doesnt have support to get data with multiple query string parameters encapsulated in the class, it throws exception, here is the case:
I have interface :
where CurrencyConvertHistoryListQuery is the class including query string parameters:
exception is thrown when an enter mandatory parameter (Language = en) try to get data : it goes to exception with status code 400 (Bad Request).
Beta Was this translation helpful? Give feedback.
All reactions