Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to pass basic auth for api in angular 11

import { HttpHeaders } from '@angular/common/http';

const httpOptions = {
  headers: new HttpHeaders({
    'Content-Type':  'application/json',
    'Authorization': 'Basic ' + btoa('username:password')
  })
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript array slice 
Javascript :: convert nuber into string react js 
Javascript :: angularjs 1.5.6 cdn 
Javascript :: validate email or phone js 
Javascript :: react mid senior dev interview questuions 
Javascript :: This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. 
Javascript :: setinterval in react 
Javascript :: javascript import 
Javascript :: mongo connect npm 
Javascript :: application pool angular 8 
Javascript :: jquery replicate div on drag 
Javascript :: hello world program in javascript 
Javascript :: How to create a GUID / UUID 
Javascript :: move element onclick javascript 
Javascript :: javascript statement 
Javascript :: Saber si un elemento existe en el DOM 
Javascript :: indexof javascript duplicate arrays 
Javascript :: auto scroll to view react-native 
Javascript :: react router link with params 
Javascript :: add even numbers recursion js 
Javascript :: javascript submit form programmatically 
Javascript :: truthy and falsy values in javascript 
Javascript :: formik seterrors 
Javascript :: String variable props 
Javascript :: express.js hello world 
Javascript :: push to object javascript 
Javascript :: import leaflet js 
Javascript :: get height webview from url video react native 
Javascript :: js for of 
Javascript :: js array random 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =