http

How would I send an NSArray filled with objects over a HTTP POST?

I have a product/shopping list (consisting of product objects with a name, product_id etc) on the iPhone side. I wish to send this list to the server where I will compare the list on the server with the one from the iphone (to merge the changes made and send the merged list back to the iphone). How would I send my array over a HTTP POST...

Pass array of srtucts as WCF method parameter in HTTP GET

i have a WCF Method that receives array of structs. the struct contains two strings "Key" and "Value": public struct mydata { public String key; public String value; } [ServiceContract] public interface IBasicService { [OperationContract] [WebGet(UriTemplate = "ReceiveStructsOfData?myDataArray={???????? WHAT DO I WRITE...

Is it OK to HTTP redirect images?

Is it OK to return a 301 / 302 / 303 code when returning an image resource? I have done this in the past and it seems to work. Is it good practice and is it compatible with most browsers? ...

Browser mixed content warning - what's the point?

I employ the Google maps API on my otherwise SSL-secured site. I invariably therefore get one of these terrible "mixed content" warnings pop up from my web app. This is annoying. I understand that this issue can be fixed when upon moving the app into production I sign up to a premier account with Google. Hurrah. I am just perplexed:...

Upload a file to a web server using C++

Hi, I want to upload files from a client location to a server. At present, I have a client-server socket program by which I could send/receive files across, but I would like to improvise it. My idea would be to transfer the file using HTTP PUT/POST from client (most of the coding on client side) to the server. Since I have no idea abo...

correct HTTP response headers to cause 304s after content expiration

I'd like an HTTP response to expire 24 hours from now (meaning the browser won't make any requests for that URL until tomorrow). But, if the request is re-issued tomorrow after expiration, I want to make sure the browser will send the right request headers so that the server will send a 304 instead of forcing the client to re-download th...

Send httprequest in Java using java.net package

This is my code on the client side: import java.io.*; import java.net.*; public class httpClient { public void TcpSocket() { String sentence; String modifiedSentence; StringBuffer contents= null; //open a socket connection on port 80 try{ Socket clientSocket = new Socket("lo...

ASP.NET MVC - How to Create a RESTful Controller Scheme?

Hi Guys, If this is a duplicate, please let me know - because i had a quick look and couldn't find anything that really answers my question. I'm experimenting with ASP.NET MVC 2. Now coming from a Web Forms background, i only really dealt with HTTP GET and HTTP POST. I'm trying to see how i could apply GET/PUT/POST/DELETE to the respe...

How to download only the headers with WebRequest

I’m writing some scripts to look for vulnerabilities to the padding oracle exploit in ASP.NET for which I need to look at the HttpStatusCode in the response. I’m doing this across a large number of my sites with different scenarios and performance is important. I can do this just fine with the following code: var req = (HttpWebRequest)W...

What determines if a downloaded file should be saved as read-only or read-write?

When you write some binary data in the http response stream (of Servlet etc) or using the Content-disposition header, what is the factor that determines whether the downloaded file is saved as readonly or has write permissions ? How can we control whether to make it read-only or not? Is that browser/OS dependant? ...

can't get response header location using JAVA's URLConnection

Hi all, can someone kindly suggest what I'm doing wrong here? I'm trying to get the header location for a certain URL using java here is my code: URLConnection conn = url.openConnection(); String location = conn.getHeaderField("Location"); it's strange since I know for sure the URL i'm refering to return a Location header and using ...

Best way for long-time login with Java Servlets

In my web appication i need to recognize signed in users even if they restart the browser ("Remember me" function of web sites). What is the best practice to achieve this using Java Servlet API? I've considered the following options: Using long-term HttpSession sessions and storing user identifier as an attribute of the session. This...

How do you set a cookie for a web request in Silverlight

I want to set a cookie value for a http POST request, caqn this be done in Silverlight? If so which class should I use HttpWebRequest, WebCLient or something else? ...

Forcing no-cache for internet explorer over HTTPS with HTTP response headers?

So, I recently found this little gem. http://support.microsoft.com/kb/323308 Essentially, IE doesn't haven't Cache-Control: no-cache properly over HTTPs, which breaks the download. However, I need to disable caching for a number of responses across my application which hit the same IO write path, which I can easily control. Is there ...

how can I do quick searching in flex?

I used character based searching name in data grid by using http services . so i used text box and data grid , fcomptxt is text box id fComptxt.addEventListener(Event.CHANGE,applyFilter); public function applyFilter(e : Event):void { CompanyViewBean.companyViewBean = new CompanyViewBean(); CompanyViewBean.company...

Check if an URL has got http:// prefix

Hi, In my application, when the user add an object, can also add a link for this object and then the link can be opened in a webView. I tried to save a link without http:// prefix, then open it in the webView but that can't open it! Before webView starts loading, is there a method to check if the URL saved has got http:// prefix? And if ...

SOAP over HTTP Web Services and timeouts

I have a few specific questions about web services (SOAP over HTTP): A client calls a web service. If, in the middle of the call, the client terminates it's own connection, is the server aware that the connection was terminated? This is more of a HTTP question. Is is possible for a client to call a web service and be forced to wait for...

how to parse HTTP POST(file upload) stream?

I am using actionscript engine to upload a file, the engine will select the file and send the file over network thru HTTP POST command, the document says the POST message is like: POST /handler.cfm HTTP/1.1 Accept: text/* Content-Type: multipart/form-data; boundary=----------Ij5ae0ae0KM7GI3KM7ei4cH2ei4gL6 User-Agent: Shockwave...

How to configure an HTTP Proxy like Fiddler2 or Charles Web Proxy with the latest Android Emulator on Windows?

I'm at complete odds over configuring a proxy to inspect the HTTP(S) traffic for the app I'm developing. I've tried running Fiddler2 and Charles Web Proxy, both run on 127.0.0.1:888, and starting up the Android emulator with the parameter: -http-proxy http://127.0.0.1:8888 To test it out I open the Android browser. I see in Fiddler2 ...

Is it possible to log HTTP connections within an iPhone application?

I'd like to develop an application that can listen for unencrypted sensitive information (info similar to the data leading to a class action filed against Storm8) across one or more iPhone/iThouch applications. I've been unable to find any info on whether or not this would be possible. Is it possible to log HTTP (including get/post an...