All Questions
19
questions
0
votes
0
answers
297
views
Ajax request with using rxjs problems with ampersand
I'm using rxjs in my application.
In package.json my rxjs dependency is "rxjs": "^5.2.0"
From that I'm using the ajax module:
import { ajax } from 'rxjs/observable/dom/ajax'
I can't find the ...
1
vote
1
answer
553
views
rxjs5 Observable.ajax ignores explicitly set HTTP headers
I'm getting my feet wet with redux-observable and OAuth2 authentication. I'm stuck at the point where I have to POST adding Authorization header to my HTTP request. The header is has not been added. ...
2
votes
1
answer
1k
views
RxJS: How to test Observable.ajax() with nock?
I'm currently learning RxJS and I'm trying to figure out how to test Observable.ajax() using nock.
Here's my simplified example without any assertions... I just want to see if nock can intercept that ...
1
vote
2
answers
1k
views
Handling ajax request - Promise vs RxJs observable - rxjs operator preferences
I am using Rxjs Observables to handle nested ajax request like the following way:
Rx.Observable.fromPromise($.getJSON('list1.json'))
.switchMap(function responseA(aResponse){
/* processing ...
0
votes
1
answer
1k
views
Can the Observable call in Angular 4 be like jquery's sync ajax way?
I have some bussiness logic function to call , which has a logic that must use HttpGet , And I have to wait until it returns the result to contiune ,if i use jquery's ajax can simple do it all , do ...
1
vote
2
answers
661
views
how combine two observable and use first Observable return value
I have two Observable , the second Observable(convertScore$) need use return value from first Observable (displayScore$) .
I use do operator that can be combine two main Observerbles, but second do ...
4
votes
1
answer
11k
views
RxJS v5: How to make a POST request with params?
I have some RxJS code and this is part of it:
.mergeMap(action => {
const user = store.getState().user;
return ajax.post(`${config.API_BASE_URL}/api/v1/rsvps`, {
rsvp: {
meetup_id: ...
2
votes
0
answers
2k
views
Posting mutipart/form-data with RxJS ajax
Is it possible to post multipart/form-data with RxJS Ajax observable?
I tried to do so by setting Content-Type in ajax settings object like so.
import { ajax } from 'rxjs/observable/dom/ajax';
let ...
5
votes
2
answers
4k
views
Concurrent Ajax requests with Rxjs
I'am currently switched from promises to observables. I am using Redux-Observable for my react app. Basically, I am looking for the best operator that will enable mutliple, concurrent ajax calls and ...
1
vote
1
answer
2k
views
How to make a FORM PUT request through rxjs ajax?
Jquery request objects have a property by the name 'data' which is used to set form data and make a form request with the right headers.
I wanted to achieve the same in rxjs ajax but could not find a ...
1
vote
0
answers
287
views
How to use rxjs progressOberserver
I'm using rxjs to make an ajax request and would like to have an observable to show the progress. At this docs page they describe a progressObserver but i cannot seem to get it to work:
const ...
5
votes
1
answer
385
views
RxJS 5 Observable and Angular2 http: Call ajax once, save the result, and subsequent ajax calls use cached result
The code below is a simplified version of what I currently have:
name.service.ts
@Injectable()
export class NameService {
const nameURL = "http://www.example.com/name";
getName() {
...
19
votes
3
answers
32k
views
Rxjs 5 - Simple Ajax Request
I'm trying to get the value from a simple ajax request, but I don't understand how to do that. Here is the code:
Rx.Observable
.ajax({ url: 'https://jsonplaceholder.typicode.com/posts', method: '...
3
votes
1
answer
594
views
Continue the subscription after error
I have a code where for each of the ids I am making an ajax request and processing them as results come in. Here is a simple replica of my actual code and jsfiddle:
var ids = [1,2,3,4,5,6];
var ids$ =...
3
votes
2
answers
895
views
RxJS 5 task queue, continue if a task fails
Imagine that we have an HTML page that fires AJAX requests. We want to make sure that AJAX requests are executed in order. The next AJAX request won't be fired until the previous one completes or ...