K keirS Well-Known Member Licensed User Longtime User Nov 3, 2012 #1 I need to be able to include a body in HTTP Delete and Get requests. Is there any way to do this? Last edited: Nov 3, 2012
Erel B4X founder Staff member Licensed User Longtime User Nov 4, 2012 #2 Get requests (and probably Delete as well) do no have a body payload. Upvote 0
K keirS Well-Known Member Licensed User Longtime User Nov 4, 2012 #3 Erel unfortunately Google disagree with you. https://developers.google.com/fusiontables/docs/v1/reference/column/delete This requires a body in a DELETE request. Whilst it's unusual to a have body in a GET request it seems the consensus on the internet is that it's perfectly permissible in HTTP/1.1 and it looks like at least one REST based API requires it. I also need to do PATCH requests as well. Would this be possible to do using the Reflection library? It looks like even the Android Java libraries don't support PATCH requests though. If not I guess I will have to brush up on Java which might be a bit of a problem as I haven't programmed in Java since 1997. Upvote 0
Erel unfortunately Google disagree with you. https://developers.google.com/fusiontables/docs/v1/reference/column/delete This requires a body in a DELETE request. Whilst it's unusual to a have body in a GET request it seems the consensus on the internet is that it's perfectly permissible in HTTP/1.1 and it looks like at least one REST based API requires it. I also need to do PATCH requests as well. Would this be possible to do using the Reflection library? It looks like even the Android Java libraries don't support PATCH requests though. If not I guess I will have to brush up on Java which might be a bit of a problem as I haven't programmed in Java since 1997.
Erel B4X founder Staff member Licensed User Longtime User Nov 4, 2012 #4 It is not possible to do it with Reflection. You will need to write a small library for that. Upvote 0
K keirS Well-Known Member Licensed User Longtime User Nov 4, 2012 #5 OK. Would I be better off using the Apache libraries or java.net? My first impression is that java.net.URLConnection appears far simpler to implement than the Apache ones. Upvote 0
OK. Would I be better off using the Apache libraries or java.net? My first impression is that java.net.URLConnection appears far simpler to implement than the Apache ones.
Erel B4X founder Staff member Licensed User Longtime User Nov 5, 2012 #6 Both should work fine. Upvote 0