FATAL EXCEPTION: main Process: com.riyadbankacademy.general_portals, PID: 26644 java.lang.IllegalArgumentException: URL query string "type=portals/{portalNamePath}/contact_us&content[submit]=submit" must not have replace block. For dynamic query parameters use @Query. My code
@POST("v2/message/email?type=portals/{portalNamePath}/contact_us&content[submit]=submit") Call<SendMailStatus> sendMail(@Query("content[name]") String name, @Path("portalNamePath") String portalNamePath, @Query("content[portal]") String portalNameContent, @Query("content[email]") String email, @Query("content[subject]") String subject, @Query("content[message]") String message); And this is what the query function looks like.
public static void sendMail(Context context, String name, String email, String subject, String message,String portalNamePath,String portalNameContent) { KnowledgeCityApi knowledgeCityApi = ApiMethods.createKnowledgeCityApi(); if (knowledgeCityApi != null) { Call call = knowledgeCityApi.sendMail(name, portalNamePath, portalNameContent, email, subject, message); Log.d(TAG, "sendMail: " + call.request().toString()); ApiMethods.makeRequest(call, Messages.RESPONSE_SEND_MAIL); } }