URLSession GET request with http body
URLSession GET request with http body
- Subject: URLSession GET request with http body
- From: Howard Shere <email@hidden>
- Date: Tue, 13 Nov 2018 01:37:13 +0000
- Thread-topic: URLSession GET request with http body
I know this is a much discussed issue on various forms (links below) but many
RESTful APIs want GET requests with http body data even tho they probably
shouldn't
I have tried this with URLSession and CFHTTPMessage with the same results: a
timeout.
I concur with the comment in the apple forum below that this is because the
length is being sent but then the http body data is never sent so the request
eventually times out.
I have no problem with other GET requests and POST requests with http body data
work fine using URLSession.
I was finally able to get a response by using libcurl (adding the http body
changes the request type to POST, but there is a call which can change it back
to GET), but I was hoping their was some other way to make this work with
URLSession.
https://stackoverflow.com/questions/978061/http-get-with-request-body
https://forums.developer.apple.com/thread/67143
Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
email@hidden<mailto:email@hidden>
www.synchronoss.com<http://www.synchronoss.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden