Code example for FormHttpMessageConverter

0
        Strategy strategy = new RegistryStrategy(registry);
        Serializer serializer = new Persister(strategy);
        xmlConverter.setSerializer(serializer);
        messageConverters.add(xmlConverter);
        messageConverters.add(new StringHttpMessageConverter());
        messageConverters.add(new FormHttpMessageConverter());
        template.setRequestFactory(requestFactory);
        template.setMessageConverters(messageConverters);
    } 
 
    protected static org.apache.http.conn.ssl.SSLSocketFactory createAdditionalCertsSSLSocketFactory(Context context) {
        try { 
            final KeyStore ks = KeyStore.getInstance("BKS");
 
            // keystore with root certificate in bks format 
            final InputStream in = context.getResources().openRawResource(R.raw.keystore);
            try { 
                ks.load(in, "password".toCharArray());
            } finally { 
                in.close();
Experience pair programming with AI  Get Codota for Java