I'm trying to convert some C# code I wrote to access a third party REST service into APEX. It's failing with an error:
"Variable does not exist: String"
at the first line of the getSecureUrl
method. I checked both variables I'm passing in and they're valid instances with values inside, so I'm not sure where its breaking down and the error message is just not helpful. Here's the code that's causing the error:
private string getSecureUrl(
String method,
List<String> parameters) {
String requestUrl = String.format('https://blargh.com/v2/{0}', method); // error!
return String.format(requestUrl, parameters);
}
/// Authorization Methods ============================================================================
private void authorize(
String userName,
String token) {
String requestUrl = this.getSecureUrl('UserAuth/login?username={0}&app_token={1}', new String[] {
userName,
token
});
this.getResponse(requestUrl);
}
I'd appreciate some help because APEX is driving me out of my mind...