Questions tagged as 'asp.net-web-api'

2
answers

Shortcuts url C # [closed]

I'm setting a code in C # for a url shortener api to send in sms inside an application, everything is working, however the api outside of the code works, but inside the code oo return nothing comes back, I'm not much Experienced in C #, can anyo...
asked by 13.09.2016 / 21:12
2
answers

How to create a header of type date but in the form of ISO 8601

I am creating a communication with a web api and I needed to create a header of type date but formatted to ISO 8601 . What I want is to get the following output:    Date: 2017-09-13T08: 21: 08Z My code is as follows: var tempo = Date...
asked by 13.09.2017 / 10:36
2
answers

How popular is an object with the return of a WebApi query?

How popular is the variable _clientes type Cliente with the return of a query to a WebApi ? Following the great suggestion of the Damon Dudek I came across the error below: publicclassClienteController:Controller{Htt...
asked by 22.08.2017 / 23:37
1
answer

I made a sum with lambda and it is not working as expected

I need to do a general sum for total and profit. If I made a sale with 4 items, I'm seeing in my grid four sum and that's not it, even if it repeated 4 times, but it should be just a sum. I need this to generate a graph where someone will see th...
asked by 17.10.2017 / 21:07
1
answer

How to send complex object to Web API?

I need to pass a parameter to my Controller in the Web API which is a complex object, this object has some normal properties (the most complex is a DateTime). I'm doing the following, but I can not access: WebApiConfig Route: config.Routes....
asked by 14.10.2015 / 22:00
2
answers

Custom return in WEB API

Good afternoon. I would like to know if there is any standard or good practice (independent of the programming language) for building Web APIs that allow customization of the content of the response by the client (user of this API). Exampl...
asked by 11.10.2016 / 22:16
2
answers

How to receive the view model in a GET request WebAPI?

Well, I have here a problem with my API and would like to ask for your help. I have a form here in Knockout JS, I do serialize from a constructor which in turn returns me a querystring so    API = Page = 1 & MinPrice = 185 & MaxPrice = 694...
asked by 16.03.2016 / 13:21
1
answer

Web API - Token

An MVC application makes access to the WEB API services. To access the WEB API, a token is mandatory. In the WEB API application there is a button that generates the token. How to make the WEB API accept only the token generated throug...
asked by 21.03.2016 / 21:53
1
answer

Validations in Webpapi

I'm starting to study webapi with knockout , using a classe f% as an example I made my model , in knockout I made the list and include it, in my classe I have decorated the attributes with some data annotation...
asked by 05.08.2014 / 22:51
1
answer

I can not get list of an API

This URL works on postman: link . I need now in another MVC project to bring the list of cities. When I do this I get this error:    The template item entered in the dictionary is from   type 'System.Threading.Tasks.Task 1[System.Collecti...
asked by 09.08.2018 / 18:04