Android Question PostString passing the Parameter string to ASP.NET Web API

Calvin Yee

Member
Licensed User
Hi, Erel!

I'm not sure what I'm actuall doing wrong.

B4X:
Dim JobChgPwd As HttpJob
    JobChgPwd.Initialize("JobChgPwd", Me)
    JobChgPwd.PostString(Starter.URILink & "/api/customer/UpdatePassword", "UserLoginID=" & Starter.kvs2.GetSimple("CurrUserLoginID") & "&" & "NewPassword=" & txtConfirmPassword.Text.trim)
    JobChgPwd.GetRequest.SetHeader("Authorization","Bearer " & Starter.kvs2.GetSimple("CurrUserTokenAccess"))
    JobChgPwd.GetRequest.SetContentType("application/json")
    Wait For (JobChgPwd) JobDone(JobChgPwd As HttpJob)
    If JobChgPwd.Success Then
        Log(JobChgPwd.GetString)
        Dim jNDparser As JSONParser
        jNDparser.Initialize(JobChgPwd.GetString)
        Dim root As Map = jNDparser.NextObject
        Dim result As String = root.Get("result")
        Dim data As String = root.Get("data")
        Dim resultset As List = root.Get("resultset")
        If resultset.IsInitialized=True Then
            Msgbox(data,"Change Password")
        End If    
    End If
    JobChgPwd.Release

Running above coding and show following output:-
ResponseError. Reason: Not Found, Response: {"Message":"No HTTP resource was found that matches the request URI 'https://www.abc.com.my/api/customer/UpdatePassword'."}

API code:
public async Task<object> DoUpdatePassword(string UserLoginID, String NewPassword)
 

DonManfred

Expert
Licensed User
Do you expect to get help with this less information you posted?

What is the api you are calling (link to Documentation)? Or link to download the sdk and example project for Eclips/Android Studio
 
Upvote 0

DonManfred

Expert
Licensed User
Website not found. Thank you for your help. I´m out here, i do not want to get fooled.
Post a REAL URL to the download of the Example and/or Documentation. A FAKE URL is of ZERO help.

Alternatively you can contact your webmaster (the one from the asp site) and ask him what the problem is.
 
Last edited:
Upvote 0

OliverA

Expert
Licensed User
Website not found.
It's up now, so must be intermittent issues with the site. It still does not work though
{"Message":"No HTTP resource was found that matches the request URI 'https://www.abc.com.my/api/customer/UpdatePassword'."}
Looks to me like there is no api service available at the link you posted. If it is, something is not configured properly on the servers end (@DonManfred's point). Once that is up and running we can talk about your code (your PostString call is not producing the proper URL as per API docs you posted).
 
Upvote 0
Top