import { request, Option } from '../utils/request';

export default class BasicService {
  private readonly baseURL: string;

  constructor(baseURL: string = '') {
    this.baseURL = baseURL;
  }

  get(url: string, options?: Option) {
    return request._request('get', url, null, options);
  }

  post(url: string, data?: any, options?: Option) {
    return request._request('post', url, data, options);
  }

  put(url: string, data?: any, options?: Option) {
    return request._request('put', url, data, options);
  }

  delete(url: string, options?: Option) {
    return request._request('delete', url, null, options);
  }
}
