Background
I have a POST request that I do using CURL the following way:
curl --data “reqCode=validateOfficeDetails&currLanguage=ca_ES” -X POST Generalitat de Catalunya - Oficina virtual de tràmits ciutadans
My objective is to replicate this request using HTTPoison.
Code
Thus far, this is how I am doing it:
HTTPoison.post("https://ovt.gencat.cat/gsitfc/AppJava/citpre/citpre.do", "reqCode=validateOfficeDetails&currLanguage=ca_ES", [{"Content-Type", "application/x-www-form-urlencoded"}])
But I am unsure this is the way to go because I am placing the --data
parameters in what is the body.
Is this correct?