Curl y Content-type:

217 views
Skip to first unread message

Daniel Du Pré

unread,
Sep 4, 2023, 10:47:26 AM9/4/23
to Harbour Users
Hola Foro,
Comenzando a escribir algunas lineas para probar consumir ws con Curl, veo que en el Header hay que incluir Content-type:, pero no encuentro una lista de todas las opciones posibles que se pueden poner luego de los dos puntos. 
En los ejemplos que vi, solo aparecen application/json y text/xml;charset=UTF-8" y en la web de curl solo  vi que se menciona multipart/mixed.

¿Alguno sabe donde puedo obtener dicha lista?
Desde ya muchas gracias
Daniel

Google traslator
Hello Forum,
Starting to write some lines to try consuming ws with Curl, I see that in the Header you have to include Content-type:, but I can't find a list of all the possible options that can be put after the colon.
In the examples I saw, only application/json and text/xml;charset=UTF-8" appear and in the curl web I only saw that multipart/mixed is mentioned.
Does anyone know where I can get that list?

Thank you very much
Daniel

Ajtim Kinrogdop

unread,
Sep 5, 2023, 12:06:27 AM9/5/23
to Harbour Users

aHeader := {"accept: */*"}
aadd(aHeader, "Content-Type:  text/xml;charset=UTF-8")

...
curl_easy_setopt(curlHandle, HB_CURLOPT_HTTPHEADER, aHeader)
...


Regards,
Mitja

ponedeljek, 4. september 2023 ob 16:47:26 UTC+2 je oseba Daniel Du Pré napisala:

Daniel Du Pré

unread,
Sep 5, 2023, 10:25:32 AM9/5/23
to Harbour Users
Ajtim
Muchas gracias por tu aporte, pero como mi ingles es malo creo que no se entendió la consulta.
aadd(aHeader, "Content-Type:  text/xml;charset=UTF-8")
Lo que estoy buscando es: ¿cuales son todas los textos que se pueden poner luego de Conten-Type? es decir en el lugar donde está el texto en letra negrita. He visto que se puede poner text/xml;carset=UTF-8 o application/json, ¿hay mas opciones?

Google traductor
Thank you very much for your contribution, but since my English is bad I think the query was not understood.
aadd(aHeader, "Content type: text/xml;charset=UTF-8")
What I'm looking for is: what are all the texts that can be put after Conten-Type? that is, in the place where the text is in bold. I have seen that you can put text/xml;carset=UTF-8 or application/json, are there more options?

Regards
Daniel

hherrera

unread,
Sep 5, 2023, 12:26:42 PM9/5/23
to Harbour Users

Daniel Du Pré

unread,
Sep 5, 2023, 1:56:54 PM9/5/23
to Harbour Users
Henry,
Excelente!.
Muchas gracias

Daniel
Reply all
Reply to author
Forward
0 new messages