Questions tagged as 'rest'

1
answer

Tomcat 8 does not recognize Api REST

I have a Rest API created with Java 1.7, using spring boot. When I start the server in eclipse (which uses an embedded tomcat) the application works correctly and when I show localhost: 8080 / hello the message appears in JSON "Hello World"....
asked by 28.06.2017 / 11:06
2
answers

Capture an attribute of a JSON in Angular2 - TypeScript

I have a JSON that is sent to me as an external service from this url. link I capture these data in my angle as follows: I define my file named Base64.ts that defines the shape of my data export interface Base64{ "userId":number;...
asked by 17.10.2018 / 19:05
1
answer

How to use a permanent token with Http POST in REST services

Good morning, I'm trying to do a POST of a Json with a permanent token, but it always gives me error 401 unauthorized , code: public static async Task<Uri> CrearitemAsync(Item item) { using (var client = new HttpClie...
asked by 26.09.2017 / 16:30
2
answers

ASP.Net fill a DropDownList depending on another using Ajax and Rest service

I hope you can help me with this problem. What I want to achieve is fill a dropDownList depending on the selection of another that I load in the page_load, I'm using a rest service to do the data loading and C # language. The first DropDownLi...
asked by 25.05.2017 / 03:56
1
answer

Error consuming a REST API service with the POST method using AngularJS

I am consuming a REST API service with angularJS and the POST method, but when consuming the service, it sends me a request with the OPTIONS method. I do not understand why? I have read and leave in the web.config of the site t...
asked by 07.06.2017 / 22:36
0
answers

REST API - Serialized models do not take hostname from the production server - Django REST Framework

I am exposing an application (at the moment it is only your user scheme) with Django Rest Framework, and it happens to me that every model that I have serialized, in the url attribute, I have is the address of the localhost of my development mac...
asked by 20.02.2016 / 19:15
0
answers

How to use OAuth2 to validate users in a PHP REST API

I would like to know since I made a REST API in PHP and I only need the login part, I have listened to OAuth2 but I do not really know how to use it or implement it in PHP so that each time I make a request I validate this user     
asked by 27.01.2017 / 16:12
1
answer

Implement Http Headers in Ionic-Angular Project (Enable Cors in Api Rest)

I am trying to consume an ApiRest, but because they added a token validation, I can not consume it. Before they added that validation, if it managed to consume it correctly. As you have to send the token, I can not consume it. The error is as...
asked by 02.10.2018 / 19:55
2
answers

NgFor only supports binding to Iterables such as Arrays

Good morning, I am new at Angular2 and I have some problems with the use of Observables and components ERROR to be fixed    ERROR Error: Can not find a differ supporting object '[object Object]' of type 'object'. NgFor only supports bind...
asked by 13.11.2017 / 16:12
2
answers

Consume web service with PHP?

I need to consume data through GET and POST to a web service, this operation I have to do from PHP. My question is, what are the components that I need to be able to make this consumption? or any basic example of how this is done?     
asked by 26.04.2017 / 20:32