Can the Squirrel Regexp class be added into Agents?
I’m trying to check request.headers for a particular Content-Type but it’s not super easy without some kind of string.match function which the Regexp class contains. The use case is to check and see if a POST has the header “content-type: application/x-www-form-urlencoded” however when posting from a browser you may get some other valid things come along for the ride (when using the Firefox RESTClient I get “content-type: application/x-www-form-urlencoded; charset=UTF-8” ). Right now I have no simple method to check if the content-type contains the substring “application/x-www-form-urlencoded”.
Also, I discovered that all the header keys in request.headers are automatically set to lowercase but I haven’t found that documented anywhere.