Do all requests from the api explorer come in as posts?
I have a query dto whose only verb is “GET” and I am being told upon calling it from the api explorer
“Could not find method named Post(ItemsQuery) or Any(ItemsQuery) on Service MASServices”
If I put in a service method for AnyAsync it hits it but I want it to be Get Only. I have changed the verbs to be “GET” only as well as all verbs as shown here. Both yield the same results.
Here is the Request class
[Route("/MAS/Items", Verbs="GET,POST,PUT,DELETE", Priority = 0)]
[Route("/MAS/Items/{Id}", Verbs="GET,POST,PUT,DELETE", Priority = 0)]
[Route("/MAS/Items/{CompanyID}/{NamesContains}/{LongDescsContains}", Verbs="GET,POST,PUT,DELETE")]
[NamedConnection("MAS")]
public class ItemsQuery : SPFMBaseQuery<Item>, ISPFMDataQuery<Item>, IReturn<Item>, IJoin<Item, ItemDescription>, IJoin<Item, SalesOrderLine, SalesOrder>, IJoin<Item, PurchaseOrderLine, PurchaseOrder>
{
public string CompanyID { get; set; }
public int? Id { get; set; }
public int[] StatusIn { get; set; }
//[OrderOfPrecedence(2, ApplyTo = ApplyTo.Get, QueryTerm = QueryTerm.And, ValueQueryTerm = QueryTerm.Or, Field = "NamesContains")]
public string[] NamesContains { get; set; }
//[OrderOfPrecedence(2, ApplyTo = ApplyTo.Get, QueryTerm = QueryTerm.And, ValueQueryTerm = QueryTerm.Or, Field = "LongDescsContains")]
public string[] LongDescsContains { get; set; }
}
Here is the base class.
public abstract class SPFMBaseQuery<T> : QueryDb<T>, ISPFMDataQuery where T : ISPFMDataItem
{
public virtual bool Summary { get; set; } = true;
public virtual string[] Children { get; set; } = new string[0];
public virtual bool CanCancelRequest { get; set; } = false;
}
This was working just a few days ago.
Any help would be appreciated. I am working with 6.0.3 from Myget.
Derek