Hello
I think the question has already been asked but I did not really find anything that could help me.
So here you have an AJAX request perform with jquery
$.ajax({
type:"GET",
async:false,
data: {pageSize:1000},
url:BRAPI_V1_URL_ENDPOINT + URL_CALLS,
traditional:true,
timeout:TIMEOUT,
success:function(jsonResponse) {
var dataList = getDataList(jsonResponse);
mainLoop: for (var i=0; i<REQUIRED_CALLS.length; i++)
{
for (var j=0; j<dataList.length; j++)
if (dataList[j] != null && REQUIRED_CALLS[i] == dataList[j]['call'])
continue mainLoop;
unimplementedCalls.push(REQUIRED_CALLS[i]);
}
},
error:function(xhr, ajaxOptions, thrownError) {
errorMsg = "No BrAPI source found at " + BRAPI_V1_URL_ENDPOINT + " (error code " + xhr.status + ")"
}
});
You can see that we can give a data parameter at the time we write the request Here I gave {pageSize:1000} as parameter. Now I use fecth to make my Ajax request but I don't know the way to give one or more parameters with fecth. So that's my question !
Thanks