I try to write a HTTPRequester using CFNetwork and with Stream Reader. It is just an a interface to send GET/POST/PUT... request but I can able to create the CFHTTPMessageCreateRequest and set header and postbody also create NSInputStream and successfully open it but the response callback is not getting fired.
Any idea?
I found the ASIHttp code but I cannot able to use it.
can any one give us a complete example code?
My end requirement is to work with socket. setting NTLM based authenticated GET/POST request through CFSocket. any help?
Can anyone give me a simple example about how to send a POST request using CFNetwork?
thanks in advance,
Naveen Shan
Related
I need a tool which gives me a URL to make a HTTP request that will be recorded and it shows me what body was sent, which headers, which parameters, the method...
It's like something kind of opposite of Postman.
I tried to find such type of tool/service but didn't find any. If someone knows something similar, please let me know, thank you.
Actually, Postman has a feature which captures the request:
Enable it and just make the call to the set port (localhost:5555 by default) and it will be saved under the request history.
We are using REST in our APIs. We are trying to capture the HTTP response and HTTP response Header data in HP Loadrunner to perform load test. Could someone kindly tell how it can be acheived ?
Regards
Amit
Please take a look at this blog post
Hi I am trying to make a call to external rest service using httpwebrequest. I am sending some payload with the httpwebrequest. Now I am trying to code the endpoint. I am not able to figure out the how to get the payload that I sent along with httpwebrequest? I may sound stupid but any help would be appreciated.
I figured it out. It is same as making a rest call using any rest client. you can get the payload using "args" parameter.
for example I am sending a Json Object in the payload. Then I can receive it using the following code:
JObject items = args.payload["items"];
Not sure if it helps anybody.
I'm using Fiddler to debug some particularly painful AJAX code, and in the POST requests that are being sent across to the server the Request BODY is UrlEncoded. This leads to me having to cut and paste the text into an online app to UrlDecode the text into the JSON object for the request. There has to be a better way to do this.
Does anyone know how I can make fiddler automatically URLDecode the body of the POST Request?
Well, you can simply press CTRL+E to decode locally. But depending on the format, you may also be able to use the WebForms Inspector.
Fiddler can manipulate the HTTP request and response in any way you like:
https://stackoverflow.com/a/23615119/264181
I am developing an app that will upload the image from the iphone to a server. In server side there is a php program to handle the uploaded image. I am using the NSURLConnection with the Post method and have set the post body of the request. When I upload the image, I could see the image uploaded 3 times(in the server), but after sometime didFailWithError: is called stating that "lost network connection". What could be the reason for this? My doubt is that why is that image is uploaded multiple times? I have set the timeout of the request to 3600.0
Any help is appreciated.
Thanks
In my case, i have forgot to set method to POST like this:
[aRequest setHTTPMethod:#"POST"];
Hope it helps
How does your server respond to the upload? What status does it return to the client? If it accepts the image then resets the connection without replying to the POST request, you'll see the behaviour you've described.