public void GetDictionary(string project, string app, string format) { try { format = MapContentType(project, app, format); if (IsAsync()) { string statusUrl = _adapterProvider.AsyncGetDictionary(project, app); WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.Accepted; WebOperationContext.Current.OutgoingResponse.Headers["location"] = statusUrl; } else { DataDictionary dictionary = _adapterProvider.GetDictionary(project, app); _adapterProvider.FormatOutgoingMessage <DataDictionary>(dictionary, format, true); } } catch (Exception ex) { WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.InternalServerError; HttpContext.Current.Response.ContentType = "text/plain"; HttpContext.Current.Response.Write(ex.Message); } }