import axios , { AxiosResponse } from "axios" ; import TableEntityTestConfig from "./table.entity.test.config" ; import { axiosRequestConfig } from "./table.entity.tests.utils.for.rest" ; export param { string } path param { string } body param { * } headers return { Promise < AxiosResponse < any > } export async function postToAzurite ( path , body , headers ) { const url = `${ TableEntityTestConfig . protocol }://${ TableEntityTestConfig . host }:${ TableEntityTestConfig . port }/${ TableEntityTestConfig . accountName }/${ path }` ; const requestConfig = axiosRequestConfig ( url , path , headers ) ; const result = await axios . post ( url , body , requestConfig ) ; return result ; } export param { string } path param { * } headers return { Promise < AxiosResponse < any > } export async function getToAzurite ( path , headers ) { const url = `${ TableEntityTestConfig . protocol }://${ TableEntityTestConfig . host }:${ TableEntityTestConfig . port }/${ TableEntityTestConfig . accountName }/${ path }` ; const requestConfig = axiosRequestConfig ( url , path , headers ) ; const result = await axios . get ( url , requestConfig ) ; return result ; }