added in basic api request
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import axios from "axios";
|
||||
import https from 'https';
|
||||
|
||||
|
||||
const agent = new https.Agent({
|
||||
rejectUnauthorized: false,
|
||||
})
|
||||
const crmHeaders = {
|
||||
headers:{
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"OData-MaxVersion": "4.0",
|
||||
"OData-Version": "4.0",
|
||||
"Accept": "application/json",
|
||||
"Prefer": "odata.include-annotations=\"*\"",
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const getBasicSearch = (searchString) => {
|
||||
console.log('got to axios', searchString)
|
||||
|
||||
return axios
|
||||
//.get("https://devcrm2016.llcdt.gov.wales/DVPINS/api/data/v8.2/incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=contains(title, '" + searchString + "')&$count=true", crmHeaders,{httpsAgent: new https.Agent({rejectUnauthorized:false})})
|
||||
.get("http://dummy.restapiexample.com/api/v1/employees")
|
||||
.then((res)=>res.data)
|
||||
.catch((error)=>{
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user