HttpClient is throwing object reference not to set exception when calling rest api in .net MAUI app using Android Emulator. it works fine in WinUI - cross-platform

![This is post request call.][Here it will call the API from the Mobile App]
![This is Rest Client Constructor.][Here HttpClient is initialized and assigned]

Related

Does Restsharp support Xamarin forms call when the app is in background

I am trying to make an API call from RestSharp on a geofence event. So the app is in background and on iOS for instance the Http Client needs allow Background flags set. Does RestSharp support this mode ? Are there any examples ?
I tried setting the flag but of course it is an iOS variable so only available in the iOS Project

Am building an App using Angular 2 and backend as Shopify Api, While calling Shopify API using Angular 2 am getting issue CORS-ORIGIN error

Look at the API i used
https://{{apikey}}:{{password}}#{{yourstore}}.myshopify.com/admin/products.json
while calling the Shopify API in Post Man it's working, data is getting from Shopify Store
Problem is that While calling API in Angular 2 only getting the issue "CORS-ORIGIN"
You should not make front-end calls to the API as that exposes your private API Key to the world. You can re-think your pattern of use here with a read up on using API App Proxy calls. You can thn safely make XHR calls using the App Proxy to call the API and return results. No more CORS problems and security!

How to test MobileFirst Adapter API outside of application

I am going through the tutorials of IBM MobileFirst. I have created an android application in MobileFirst and uploaded the Java HelloWorld adapter.
I can successfully trigger the API (such as the greet function) through my android app and I get back the desired result. But I would like to test the API also in the Browser, or through curl or through postman... But whenever I use the Browser or curl or Postman with:
http://localhost:XXXPORTXXX/mfp/api/adapters/SampleAdapter/resource/greet?name=myname
I dont get any string back... the browser stays empty and curl does not write anything...
If you're using MobileFirst v8, the adapter APIs are exposed as a Swagger doc. The swagger doc also gives you the curl command to run.
However, this works only on unprotected adapter methods.
If you wish you use this with protected methods, then you'll need to make use of a confidential client. See https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/authentication-and-security/confidential-clients/

File not found exception using Yodlee API on android

I am trying yodlee api on android but getting file not found exception when I called HTTP GET request on : Request URL=https://developer.api.yodlee.com/ysl/restserver/v1/providers?name=icici.
When I used java sample api as standalone java application it's work fine but in android it is giving exception. cobrand as well member login works fine on android.
You should first check the code, as this is not something which Yodlee API returns. Seems to be an issue with your android code. Do you mind updating the question with your code and actual exception you are getting?

Azure App Service Oauth failure after Mobile Service migration

Up to this point, I had a functioning Azure Mobile Service with service-directed OAuth working nicely for Google. I tried to rehost the mobile service as an app service since mobile services are deprecated. I also have an HTML/JS web app that accesses my service through the MobileServiceClient JS client. This is where the fun starts.
After changing the redirect address to the appropriate app service address in the Google API manager, I get a message saying I'm successfully logged in in a new popup window: .
Clicking on "Return to Website" takes me to the address of my app service, not the app that initiated the OAuth request, and if I close this window, the MobileServiceClient throws a "cancelled" exception and I don't get my credentials.
What am I missing or what changed that I need to account for?
Thanks!
It turns out that this particular behavior happens when using an older version of the MobileServiceClient JS library. Replacing the 1.2.7 version with the 2.0.0beta version fixed this. To get the whole OAuth flow working, I also needed to add the appropriate addresses to the allowedExternalRedirectUrls node of the config/authsettings node through the Azure Resource Explorer. If there is a nicer way to do it than through the resource explorer, I don't know what it is.