How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • import { Injectable } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    
    @Injectable()
    export class ConfigService {
      constructor(private http: HttpClient) { }
    }
    Docs
  • import { HttpHeaders } from '@angular/common/http';
    
    const httpOptions = {
      headers: new HttpHeaders({
        'Content-Type':  'application/json',
        Authorization: 'my-auth-token'
      })
    };
    Docs
  • import { Injectable } from '@angular/core';
    import {
      HttpEvent, HttpInterceptor, HttpHandler, HttpRequest
    } from '@angular/common/http';
    
    import { Observable } from 'rxjs';
    
    /** Pass untouched request through to the next request handler. */
    @Injectable()
    export class NoopInterceptor implements HttpInterceptor {
    
      intercept(req: HttpRequest<any>, next: HttpHandler):
        Observable<HttpEvent<any>> {
        return next.handle(req);
      }
    }
    Docs
  • const { http, https } = require('follow-redirects');
    
    http.get('http://bit.ly/900913', response => {
      response.on('data', chunk => {
        console.log(chunk);
      });
    }).on('error', err => {
      console.error(err);
    });
    Docs
  • import { HttpClientModule } from '@angular/common/http';
    import { OAuthModule } from 'angular-oauth2-oidc';
    // etc.
    
    @NgModule({
      imports: [
        // etc.
        HttpClientModule,
        OAuthModule.forRoot()
      ],
      declarations: [
        AppComponent,
        HomeComponent,
        // etc.
      ],
      bootstrap: [
        AppComponent
      ]
    })
    export class AppModule {
    }
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples