public string Status() { var cloud = new QWebClient(this.baseUrl); var result = cloud.Get("/status"); Console.WriteLine("Result from get /status:"); Console.WriteLine(result); return(result); }
public string Test(string req) { var cloud = new QWebClient(this.baseUrl); var result = cloud.Get("/"); Console.WriteLine("Result from get /:"); Console.WriteLine(result); return(result); }
public IQuelleSearchResult Search(QRequestSearch req) { var cloud = new QWebClient(this.baseUrl); if (cloud != null) { try { var payload = JsonSerializer.Serialize(req); var packedResponse = cloud.Post("/search", payload, mimetype); var str = System.Text.Encoding.Default.GetString(packedResponse.data).Trim(); var response = JsonSerializer.Deserialize <QSearchResult>(packedResponse.data); return(response); } catch (Exception ex) { var bad = new QSearchResult(); bad.AddError("Unable to pack message (before calling search provider)"); return(bad); } } return(null); }