Change API JS script to check if method is defined
Change API JS script to check if method is defined

Change CoreAPI JavaScript script to check if the formMethod field is
defined before using it as not all the API calls (e.g. views) use/define
it, leading to errors.

kingthorin/zaproxy,Ali-Razmjoo/zaproxy,thc202/zaproxy,psiinon/zaproxy,thc202/zaproxy,gsavastano/zaproxy,gsavastano/zaproxy,zaproxy/zaproxy,NVolcz/zaproxy,Ali-Razmjoo/zaproxy,kingthorin/zaproxy,gsavastano/zaproxy,zaproxy/zaproxy,zaproxy/zaproxy,Ali-Razmjoo/zaproxy,kingthorin/zaproxy,NVolcz/zaproxy,meitar/zaproxy,psiinon/zaproxy,zapbot/zaproxy,gmaran23/zaproxy,NVolcz/zaproxy,meitar/zaproxy,Harinus/zaproxy,gsavastano/zaproxy,zapbot/zaproxy,zaproxy/zaproxy,meitar/zaproxy,thc202/zaproxy,Harinus/zaproxy,Ali-Razmjoo/zaproxy,Harinus/zaproxy,Ali-Razmjoo/zaproxy,psiinon/zaproxy,zapbot/zaproxy,gmaran23/zaproxy,gmaran23/zaproxy,thc202/zaproxy,psiinon/zaproxy,psiinon/zaproxy,psiinon/zaproxy,NVolcz/zaproxy,zapbot/zaproxy,NVolcz/zaproxy,zapbot/zaproxy,gsavastano/zaproxy,NVolcz/zaproxy,Harinus/zaproxy,kingthorin/zaproxy,kingthorin/zaproxy,meitar/zaproxy,gsavastano/zaproxy,zapbot/zaproxy,zaproxy/zaproxy,Ali-Razmjoo/zaproxy,gsavastano/zaproxy,kingthorin/zaproxy,thc202/zaproxy,gmaran23/zaproxy,Ali-Razmjoo/zaproxy,meitar/zaproxy,gmaran23/zaproxy,zaproxy/zaproxy,kingthorin/zaproxy,psiinon/zaproxy,meitar/zaproxy,gmaran23/zaproxy,Harinus/zaproxy,zapbot/zaproxy,NVolcz/zaproxy,meitar/zaproxy,zaproxy/zaproxy,meitar/zaproxy,gmaran23/zaproxy,thc202/zaproxy,thc202/zaproxy,Harinus/zaproxy,Harinus/zaproxy