All Products
Search
Document Center

Mobile Platform as a Service:FAQ

Last Updated:Jan 28, 2021

How to troubleshoot in case of a call failure?

See Gateway exception troubleshooting.

What are the meanings of the result codes returned by APIs?

See Gateway result codes.

When OkHttp is referrenced, how to deal with the conflict between OKio and mPaaS?

To solve the conflict, perform the following steps:

  1. Comment out the wire component of mPaaS.
    1. mpaascomponents{
    2. excludeDependencies=['com.alipay.android.phone.thirdparty:wire-build']
    3. }
  2. Use the wire component provided on the Internet.
    1. implementation 'com.squareup.wire:wire-lite-runtime:1.5.3.4@jar'

How to put parameters in POST body when sending a POST request by calling the MGS RPC interface through JSAPI?

First, you must correctly configure the POST body and corresponding data model for MGS. When sending a request through JSAPI, you need to take the POST body as the value of _requestBody and put it in the requestData parameter, as shown in the following sample:

  1. window.onload = function() {
  2. ready(function() {
  3. window.AlipayJSBridge.call('rpc', {
  4. operationType: 'MYAPI',
  5. requestData: [
  6. {"_requestBody":"{\"key1\":\"value1\",\"key2\":\"value2\"}"}],
  7. headers:{},
  8. getResponse: true
  9. }, function(data) {
  10. alert(JSON.stringify(data));
  11. });
  12. });
  13. }