Hello ewerybody!
I programming in C#. I have problem with pass arg to route. This is my code:
I want all items from any order. I pass id order and my result from method are all items.
Please help me.
public OrderResponse GetAllOrdersItems(int id)
{
var token = GetBearerToken().Trim('"');
var client = new RestClient { BaseUrl = new Uri(_host) };
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer " + token);
//request.AddParameter("id", id);
request.Resource = "rest/V1/orders/1/items";
var response = client.Execute<OrderResponse>(request);
return response.Data;
}
Kind Regards.