damonwonghv / youtube-search-api

Get Youtube Search result without any login or api key
MIT License
86 stars 30 forks source link

allow to use custom axios #32

Closed juji closed 1 month ago

juji commented 2 months ago

Sometimes, we need to customize axios.

Example:

import axios from 'axios'
import axiosTauriApiAdapter from '@juji/axios-tauri-api-adapter';
import { setAxios, GetListByKeyword } from 'youtube-search-api'

const httpClient = axios.create({ 
  adapter: axiosTauriApiAdapter,
  headers: {
    origin: 'https://www.youtube.com'
  }
});

setAxios(httpClient)

GetListByKeyword('lofi').then(() => {})
damonwonghv commented 1 month ago

Please folk it instead of pull requests.