Questions tagged as 'httpclient'

2
answers

HttpStatusCode class does not exist code 207, 208 and 226

What to do when the HttpStatusCode class does not exist the 207 , 208 and 226 Someone already asked the question in GitHub: link , it seems to me that they did not do an "update". Here is the code: HttpResponseMessage response =...
asked by 04.09.2018 / 17:39
1
answer

Reapping the HttpClient and life cycle of an ApiController

Based on on this site and also on I came to the conclusion that I should not use the class HttpClient in a using block even though it implements IDisposable . This would help reuse the already instantiated object and bring...
asked by 17.12.2018 / 16:49
1
answer

CORS error when executing request using HttpClient in the Angular

I'm trying to perform an Http request using "HttpClient" from Angular 4, and I get the following error:    Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers in preflight response. According to...
asked by 08.02.2018 / 05:11
1
answer

Angular 2 Error HTTPResponse not found

I'm trying to implement a login screen that accesses an api through a server, I need to pass the user's email and password to the api, and it returns me NULL on error or a number on success ( id of the user). I'm getting the following message...
asked by 03.07.2018 / 02:53
2
answers

Angular 7 - Popular object in return API service. httpClient

Thank you in advance for your attention. I'm having trouble popularizing an object list returned from an API in Angular 7. My service class is returning service data, however I can not popular in my object list (returned from service). Below...
asked by 04.12.2018 / 03:05
0
answers

postasync submitting content null

I'm in a Xamarin project where I use a web service in PHP. The problem is as follows, I send json to ws but when I receive it by POST, nothing arrives on it C # code: HttpContent content = new StringContent(json, Encoding.UTF8...
asked by 18.07.2018 / 20:20
2
answers

How to optimize the performance of my application when doing HttpClient resequitions

I'm developing an app using Xamarin.Forms , but I have a problem. Settings such as color, company name, cover image and logo come through a request for a web service call whose return is a JSON , but every time I have that pull this informat...
asked by 03.07.2018 / 02:26
0
answers

How to use Observable to read another javascript file

In the company I work for I am forced to deal with some gambiarras and this is one more of them. It is as follows. I have an application in Angular 6 and I need to get the data from a .js file which is on a server that I do not have access to...
asked by 02.07.2018 / 06:49
1
answer

Receive status of the http client request and login token in the angle

My backend api returns a token and a status, I need to save the token in the localstorage and redirect the user to the welcome screen if the status returned from api is 200. I tried something like: user.model.ts: export class Usuario{...
asked by 06.07.2018 / 00:47
1
answer

Save Service Return Variable on Angular

I have a service that returns me a user-type object with the id of a user: My object: export class Usuario{ email: string; password: string; } In my component I instantiate my object so that it can receive the return of the servi...
asked by 03.07.2018 / 21:39