It came up that the headers issue had its origin in an incorrect entry:
'User-Agent': 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3703.0 Safari/537.36'
After correcting the entry (by removing the substring 'user-agent: '), the headers declaration may be shared by both MT and VF requests. Separate definitions introduced in the previous fix have been removed.
Added the getVesselsInPort function/service call implemented as XMLHttpRequest. The parameter accepted is a port name as displayed in various MT screens. No HTML scraping is needed. It returns a json array identical in content to the one returned by getVesselsInArea. Tried to maintain the existing coding style.
It came up that the headers issue had its origin in an incorrect entry: 'User-Agent': 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3703.0 Safari/537.36' After correcting the entry (by removing the substring 'user-agent: '), the headers declaration may be shared by both MT and VF requests. Separate definitions introduced in the previous fix have been removed.
Added the getVesselsInPort function/service call implemented as XMLHttpRequest. The parameter accepted is a port name as displayed in various MT screens. No HTML scraping is needed. It returns a json array identical in content to the one returned by getVesselsInArea. Tried to maintain the existing coding style.
Documentation has been updated as needed