arXiv (Cornell University)
Statically Checking Web API Requests in JavaScript
February 2017 • Erik Wittern, Annie T. T. Ying, Yunhui Zheng, Julian Dolby, Jim Laredo
Many JavaScript applications perform HTTP requests to web APIs, relying on the request URL, HTTP method, and request data to be constructed correctly by string operations. Traditional compile-time error checking, such as calling a non-existent method in Java, are not available for checking whether such requests comply with the requirements of a web API. In this paper, we propose an approach to statically check web API requests in JavaScript. Our approach first extracts a request's URL string, HTTP method, and the …