Azure Mobile AppサービスでAPIControllerにアクセスしようとしているHTML/JSクライアントがあります。私は、NOT FOUNDますAzure Mobile AppサービスのカスタムAPI呼び出し
しかし
https://myapp.azurewebsites.net/Lookup/GetTransactionType?TenantID= {{TenantID}}:
後
は、ここでの問題は、私のAPIのは、このようなとして公開されていることである私のコードvar _client = new WindowsAzure.MobileServiceClient("https://myapp.azurewebsites.net/"); var pp = _client.invokeApi("/Lookup/GetTransactionType", { body: null, method: "get", parameters: { TenantID: 1 }, headers: { "ZUMO-API-VERSION": "2.0.0", "Content-Type":"application/json", "Cache-Control":"false", "x-zumo-auth": "tada" } }).done(function (results) { var message = results.results.count; }, function (error) { alert(error.message) });
です次のURLを探してからクライアントにエラーが発生しました:
(XHR)GET - https://myapp.azurewebsites.net/api/Lookup/GetTransactionType?TenantID=1
をどのように私は、URIで/ API を排除することができますか?言及@rolspaceとして
あなたがあなたのリクエストの絶対URLで.invokeApi関数を呼び出す必要があり、この動作を防ぐためと思われます。http://azure.github .io/azure-mobile-apps-js-client/sdk_src_MobileServiceClient.js.html#line404 – rolspace