【问题标题】:"Message":"No HTTP resource was found that matches the request URI '}"Message":"没有找到与请求 URI 匹配的 HTTP 资源 '}
【发布时间】:2021-09-06 16:06:14
【问题描述】:

使用改造请求。

发布方法 //注册

    @POST("UIGAttendance/UserRegistration")
    @FormUrlEncoded
    Call<RegistrationListApi> signUp(@Field("CNIC") String CNIC ,@Field("FullName") String FullName,
                                     @Field("address") String address, @Field("Email") String Email,
                                     @Field("Mobile") String Mobile, @Field("Username") String Username,
                                     @Field("Password") String Password, @Field("HostName") String HostName);

邮递员: http://202.69.38.84/UIGAttendance/API/UIGAttendance/UserRegistration?CNIC=*****-1890196-5&FullName=Test User&address=Lahore Pakistan&Email=Test@gmail.com&Mobile=03344152669&Username=TestUSer&Password=TestPassword&HostName=测试主机

错误: {"Message":"没有找到与请求 URI 'http://202.69.38.84/UIGAtendance/API/UIGAtendance/UserRegistration' 匹配的 HTTP 资源。"}

enter image description here

【问题讨论】:

  • 在邮递员中检查你的 api 的响应
  • { "用户注册": [ { "ResponseCode": "01", "ResponseDesc": "用户已经存在" } ] }
  • 响应正常
  • 上传邮递员要核对的图片
  • 已添加!!只需点击链接

标签: android android-studio retrofit


【解决方案1】:

你在邮递员中使用查询参数,但在代码中使用formurlencoded

【讨论】:

  • 使用@Query 代替 Field 和 foformurlencoded
  • 得到响应.!!谢谢
猜你喜欢
  • 1970-01-01
  • 2016-12-01
  • 2017-06-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-09-02
  • 1970-01-01
相关资源
最近更新 更多