tagged [http]

How do I enable HTTP PUT and DELETE for ASP.NET MVC in IIS?

How do I enable HTTP PUT and DELETE for ASP.NET MVC in IIS? I use HTTP `PUT` and `DELETE` in my ASP.NET MVC3 application. When I run it in local, every thing works correctly; But when I publish the ap...

PHP header redirect 301 - what are the implications?

PHP header redirect 301 - what are the implications? I have `example.com`. If the user is logged in, it should load automatically `example.com/option-X` where X is a predefined choice of the user. So,...

How do I POST a x-www-form-urlencoded request using Fetch?

How do I POST a x-www-form-urlencoded request using Fetch? I have some parameters that I want to POST form-encoded to my server: I'm sending my request (currently without parameters) like this ``` var...

What is the difference between POST and GET?

What is the difference between POST and GET? I've only recently been getting involved with PHP/AJAX/jQuery and it seems to me that an important part of these technologies is that of `POST` and `GET`. ...

23 Jun at 22:59

POST request with a simple string in body with Alamofire

POST request with a simple string in body with Alamofire how is it possible to send a POST request with a simple string in the HTTP body with Alamofire in my iOS app? As default Alamofire needs parame...

23 Jun at 22:30

Nginx reverse proxy causing 504 Gateway Timeout

Nginx reverse proxy causing 504 Gateway Timeout I am using Nginx as a reverse proxy that takes requests then does a proxy_pass to get the actual web application from the upstream server running on por...

Use of PUT vs PATCH methods in REST API real life scenarios

Use of PUT vs PATCH methods in REST API real life scenarios First of all, some definitions: PUT is defined in [Section 9.6 RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6): > Th...

20 Jun at 09:30

How to respond with an HTTP 400 error in a Spring MVC @ResponseBody method returning String

How to respond with an HTTP 400 error in a Spring MVC @ResponseBody method returning String I'm using Spring MVC for a simple JSON API, with `@ResponseBody` based approach like the following. (I alrea...

19 Jun at 12:3

How to make HTTP Post request with JSON body in Swift?

How to make HTTP Post request with JSON body in Swift? I'm trying to make an HTTP post request with a JSON body : How to be able to add an NSdictionnary to the HTTP request body. Here is my code, it d...

2 Jun at 00:19

Proxies with Python 'Requests' module

Proxies with Python 'Requests' module Just a short, simple one about the excellent [Requests](https://requests.readthedocs.io/en/latest/) module for Python. I can't seem to find in the documentation w...

URL mapping with C# HttpListener

URL mapping with C# HttpListener In the code below I am waiting for any call to the 8080 port. ``` public static void Main() { HttpListener listener = new HttpListener(); listener.Prefixes.Add("ht...

23 May at 00:44

How can I get the clients IP address from HTTP headers?

How can I get the clients IP address from HTTP headers? I understand it's a standard practice to look at both these variables. Of course they can easily be spoofed. I'm curious how often can you expec...

10 May at 16:3

POST JSON fails with 415 Unsupported media type, Spring 3 mvc

POST JSON fails with 415 Unsupported media type, Spring 3 mvc I am trying to send a POST request to a servlet. Request is sent via jQuery in this way: where newCategory is ``` function newCategory(pro...

Values of disabled inputs will not be submitted

Values of disabled inputs will not be submitted This is what I found by Firebug in Firefox. Is it the same in other browsers? If so, what's the reason for this?

What is the quickest way to HTTP GET in Python?

What is the quickest way to HTTP GET in Python? What is the quickest way to HTTP GET in Python if I know the content will be a string? I am searching the documentation for a quick one-liner like: But ...

3 Apr at 11:46

HTTP headers in Websockets client API

HTTP headers in Websockets client API Looks like it's easy to add custom HTTP headers to your websocket client with any HTTP header client which supports this, but I can't find how to do it with the w...

30 Mar at 01:12

Http verb of current http context

Http verb of current http context How do you find the http verb (POST,GET,DELETE,PUT) used to access your application? Im looking [httpcontext.current](http://msdn.microsoft.com/en-us/library/system.w...

Is there a way to discover all endpoints of a REST API?

Is there a way to discover all endpoints of a REST API? I'm wondering if its possible to programmatically discover all the endpoints of a particular API. So for example if I GET this URL with a browse...

Page loaded over HTTPS but requested an insecure XMLHttpRequest endpoint

Page loaded over HTTPS but requested an insecure XMLHttpRequest endpoint I have a page with some D3 javascript on. This page sits within a HTTPS website, but the certificate is self-signed. When I loa...

Is either GET or POST more secure than the other?

Is either GET or POST more secure than the other? When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than th...

18 Feb at 19:11

What HTTP status code should be used for wrong input

What HTTP status code should be used for wrong input What is optimal HTTP response Code when not reporting 200 (everything OK) but error in input? Like, you submit some data to server, and it will res...

17 Jan at 14:17

PHP, cURL, and HTTP POST example?

PHP, cURL, and HTTP POST example? Can anyone show me how to do a PHP cURL with an HTTP POST? I want to send data like this: To `www.example.com` I expect the cURL to return a response like `result=OK`...

16 Jan at 22:38

Does HTTP use UDP?

Does HTTP use UDP? This might be a silly question: - > If one is streaming MP3 or video using HTTP, does it internally use UDP for transport?

2 Jan at 16:21

How can I get all the request headers in Django?

How can I get all the request headers in Django? I need to get all the Django request headers. From what I've read, Django simply dumps everything into the `request.META` variable along with a lot of ...

Servlet returns "HTTP Status 404 The requested resource (/servlet) is not available"

Servlet returns "HTTP Status 404 The requested resource (/servlet) is not available" I have an HTML form in a JSP file in my `WebContent/jsps` folder. I have a servlet class `servlet.java` in my defau...