Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I’m using the code below to try to extract a value (ReturnStatus) from the response headers; Keep-Alive: timeout=5, max=100 ReturnStatus: OK,SO304545 Server: Apache/2.4.29 (Win32) OpenSSL/1.0.2mThe code; import { Injectable } from '@angular/core';import { Account } from './model/account'; import { HttpClient } from '@angular/common/http'; import { Observable, ...

  • 0

I’m improving an existing API, and the requirement is to provide a single get method which can accept multiple search criteria and based on those criteria perform the query. I’m using Spring MVC. The get method signature: @GetMapping("/subscribers") public ResponseEntity<List<SubscriberDTO>> getAllSubscribers(Pageable pageable, @RequestBody ...

  • 0

I’m improving an existing API, and the requirement is to provide a single get method which can accept multiple search criteria and based on those criteria perform the query. I’m using Spring MVC. The get method signature: @GetMapping("/subscribers") public ResponseEntity<List<SubscriberDTO>> getAllSubscribers(Pageable pageable, @RequestBody ...

  • 0

I’m improving an existing API, and the requirement is to provide a single get method which can accept multiple search criteria and based on those criteria perform the query. I’m using Spring MVC. The get method signature: @GetMapping("/subscribers") public ResponseEntity<List<SubscriberDTO>> getAllSubscribers(Pageable pageable, @RequestBody ...

  • 0

I am trying to make a POST call using HttpClient in an Angular 5 project, and I want to set the header: import { HttpClient, HttpHeaders, HttpRequest } from '@angular/common/http'; import { Injectable } from '@angular/core';import { AuthData } from './models/auth-data';@Injectable() export ...

  • 0

I have an auth-interceptor.service.ts to handle the requests import {Injectable} from '@angular/core'; import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http'; import {Observable} from 'rxjs/Observable'; import {Cookie} from './cookie.service'; import {Router} from '@angular/router';@Injectable() export class AuthInterceptor implements HttpInterceptor { constructor(private router: Router) {} ...

  • 0

I use Observable.forkJoin() to handle the response after both HTTP calls finishes, but if either one of them returns an error, how can I catch that error? Observable.forkJoin( this.http.post<any[]>(URL, jsonBody1, postJson) .map((res) => res), this.http.post<any[]>(URL, jsonBody2, postJson) .map((res) => res) ) .subscribe(res => ...

close