HyperText Transfer Protocol

learn more… | top users | synonyms

2
votes
1answer
57 views

HTTP API Versioning and Need to Introduce Breaking Changes to All Supported Versions

I am developing an HTTP application and deploying this by versioning it against the semantic versioning patterns/techniques/whatever they are. In order not to break existing clients and allow the ...
-3
votes
0answers
16 views

Why not successful “ HTTP GET request with socket ”? [migrated]

I want to send GET message at my Android application. After I want to receive GET response as 200 OK. But I didn't accomplish. I received 408 Request Time-outDate or nothing. Can you help me? String ...
-2
votes
1answer
79 views

Crawler - programming language choice [closed]

I'm currently developing a web crawler. The first version was developed in Node.js and runs pretty well. The issues that I encountered with Node.js are in no particular order: slow URL and ...
-1
votes
2answers
95 views

In C is it possible to change http requests to https [closed]

Long story short I've got this package that currently has a security risk where credentials are sent over http and I need to convert them to https but I currently lack the knowledge to do so. Could ...
0
votes
1answer
61 views

How to avoid server-pushing assets to clients that already have them cached?

HTTP/2 server push enables pushing assets to clients which you anticipate they'll need in order to render the page. For example, you can push your CSS/JS/images to the client at the same time as you ...
0
votes
2answers
35 views

Android. HTTP Communcation, and GCM

I have an app that sends/receive data via HTTP POST, and communicates with PHP/SQL on the backend. I however wanted to integrate GCM to I can tell the app to "check for an update" to query the ...
1
vote
1answer
94 views

How does StackExchange load data from the server without making an XHR request?

When viewing the questions for a tag on SE networks, every now and then you will get a message at the top: n questions with new activity. However the weird thing (to me) is that I don't see any ...
2
votes
1answer
60 views

What belongs in an HTTP request header vs the request body?

I'm working on a set of web services for a mobile client, and the requirements call for a unique device id to be included with all requests, to be stored in certain requests, and used to filter ...
14
votes
6answers
1k views

What to call an HTTP API that is not RESTful? [closed]

What would you call an API that is HTTP-based, uses URI to name resources and HTTP verbs (PUT, POST, DELETE, GET...) to manipulate those resources? According to Roy Fielding's complaints it is not ...
0
votes
1answer
61 views

Detect request coming from iframe

I just had this awesome idea about simulating a single page application using iframes. I am using a framework that uses layouts to display pages. Luckily I can use an empty layout (meaning it has no ...
3
votes
2answers
65 views

Does sending system-profile information with HTTP GET request conform to RESTful practices?

I'm using the Sparkle framework to update an app, and want to make use of the framework's ability to send system-profile information. The way this is done is by adding the information to the HTTP GET ...
0
votes
2answers
58 views

comparison of computer processing language vs protocol

how can explain the diference between programming languge and protocol?, can protocol have extension? we know that machines communicate with protocol, but they can also do so with expressive ...
0
votes
2answers
87 views

Content delivery design

I'm designing a system where users can access files stored in an external content storage service such as AWS's S3. Here's a simple diagram: ------ ------------ ----------------- | User ...
1
vote
1answer
137 views

Should I store my user claims in the JWT token?

I am using JWT tokens in HTTP headers to authenticate requests to a resource server. The resource server and auth server are two separate worker roles on Azure. I cannot makeup my mind as to whether ...
1
vote
2answers
445 views

How should I provide detailed information about an error, if not through HTTP status codes?

This question comes from here. I believe it deserves to be on its own instead of being lost in a long question with multiple points. I'm building an API and find myself limited by HTTP error ...
1
vote
2answers
52 views

Should I specify the userId in the REST URL structure?

Basically, one feature of my app is to retrieve the logged user's friends. Actually, I hesitate between both kind of endpoints: GET /api/users/friends GET /api/users/:userId/friends Using 1, ...
0
votes
1answer
119 views

HTTP keep alive and TCP persistent connection

What's the relationship between the two concepts? Is one HTTP Keep-Alive connection always over a long persistent TCP connection? When the HTTP connection is closed, will the TCP connection be closed ...
1
vote
2answers
45 views

HTTP status code for mobile clients

There was a debate with one of the platform engineers (as a mobile dev), about the codes being returned. The scenario is: when trying to create a resource the server is returning a 201 with the ...
0
votes
0answers
92 views

Reason why client-side JavaScript does not allow access to POST/PUT/etc contents

Is there any theoretical reason why client-side JavaScript could not be spec'd to allow for direct access to POST or PUT contents without need for a server language to write it into client-side ...
1
vote
2answers
94 views

Do web applications use HTTP as a transport layer, or do they count as an integral part of the HTTP server?

Given an HTTP server (e.g. Apache, IIS) and a web application (user code running in the server using PHP, ASP.NET and the likes), which of those can decide which HTTP status code to return for any ...
1
vote
1answer
2k views

Two way Communication between Server and Clients

Situation: We have a web application running on a server. This application needs to fetch data from some other PC(Clients), which are on a different network. On the clients' pc there are WCF hosted ...
1
vote
1answer
64 views

Request content-type of HTTP errors

HTTP allows for multiple representations of a resource. The Accept header allows the client to choose the representation of the resource. GET /foo/bar HTTP/1.1 Accept: application/pdf GET /foo/bar ...
2
votes
2answers
178 views

RESTful key-value collection

I am creating a HTTP REST API. I have a large collection of key-value pairs, at /base-url. I need to provide the ability to get and set values for a key. My first attempt: GET /base-url/{key} PUT ...
2
votes
0answers
53 views

Response Header for illegal file (format)

I have a simple upload-servlet and need to report if a file is illegal and has not been added. For some reason i am not allowed to give a html-body back, so i need to use the response-header. ...
3
votes
0answers
236 views

Rendering head :ok vs head :no_content. Any good practices?

Whenever I take in data and do something like delete a post, etc. I generally return head :no_content. For example: def destroy @post = Post.find_by(external_id: params[:post_id]) @post.destroy! ...
-2
votes
2answers
118 views

Where is it implied that REST is not based on HTTP [closed]

I've been over Fielding's paper on REST and all over the web, including StackOverflow trying to understand this. After reading everything I can about REST, I was under the impression that Fielding ...
5
votes
1answer
496 views

Why PATCH method is not idempotent?

I was wondering about this. Suppose I have a user resource with id and name fields. If I want to update a field I could just do a PATCH request to the resource like this PATCH /users/42 {"name": ...
1
vote
1answer
334 views

Should I hide certain HTTP status codes?

So I have different seniors taking different positions on this. Some saying hide nothing, those codes are there for a reason. Others saying to hide most status codes, reducing the number to a much ...
1
vote
1answer
687 views

How to respond with error message when making AJAX calls

I have an app that wasn't written by myself. If there is an error such as an invalid ID given as a parameter, I would return something like: (200 code) { "success": 0, "error": "The row ...
-3
votes
1answer
73 views

HTTP Request & Response Parameters [closed]

How are request parameters stored and arranged for a post request if it's not json or xml? Is it possible to send response parameters back in the same way?
16
votes
4answers
502 views

Providing friendly URLs for a website vs. realities of database IDs

We have a database of resources, be they products, blog posts or something. We need to design a URL scheme to address them, for the public website. Here are two examples that are database ID bound: ...
6
votes
3answers
427 views

Proper Response to HTTP Request When Too Much Data is Requested

I'm building an API for an ad serving platform that will allow you to request tracker data for ad campaigns. Campaigns often exceed hundreds of millions of requests, which means there will be many ...
16
votes
4answers
4k views

Why can't we use IP address instead of cookies in identifying the client in servlets?

I know we have some extra advantages in using the cookies over IP address, but my question is Why can't the container just remember the IP address of the client in identifying the client when he visit ...
6
votes
4answers
1k views

Is it a good idea to merge multiple HTTP requests to save bandwidth?

I am preparing a single page application that would be sometimes used over slow mobile connection. Some of its part are quite heavy in terms of API requests (fetching ten different resources for a new ...
1
vote
2answers
126 views

Should all HTTP requests including credentials be made using a POST even if it is actually just a request for data?

Assume there is a request which is going to look up a list of items from a service which requires authorisation (e.g. it's behind a Basic Authentication domain). If the service didn't require ...
0
votes
1answer
141 views

How to communicate side effects in a RESTful API on the server to the client?

I have been thinking a lot about Hypermedia REST-APIs for the last couple of weeks. One thing I am not quite sure about is how I want to model side effects on the server side. In my current project, ...
5
votes
3answers
581 views

How to handle business rules with a REST API?

I have a REST API to manage a booking system I'm searching how to manage this situation : A customer can book a time slot : A TimeSlot resource is created and linked to a Person resource. In order to ...
2
votes
5answers
268 views

Why doesn't the HTML\DOM specification allow hyperlinks to set an accept header?

The purpose of the Accept header from the client is to tell the server what kind of data it will accept as a response to its request. We can set this header in asynchronous HTTP calls in Javascript, ...
1
vote
1answer
136 views

URLs with variable query strings and cache

I am developing a media server, the basic functionality is to serve an image, which is done the following way /media/:id where :id is the id of the image. You may want to ask for a specific size, ...
0
votes
0answers
61 views

How does session middleware generally verify browser sessions?

I've been using session middleware to build web apps for years: from PHP's built-in session handling layer to node's connect session middleware. However, I've never tried (or needed) to roll my own ...
0
votes
3answers
393 views

POST and PUT requests – is it just the convention?

I've read quite a few articles on the difference between POST and PUT and in when the two should be used. But there are still few things confusing me ( hopefully questions will make some sense ): 1) ...
1
vote
1answer
58 views

Is it RESTful to resume terminated POST operation on a GET request?

I have a RESTful API, one of the resource has a state that is determined collectively by multiple servers, not all of them belong to us. One of the operation on this resource will have to modify the ...
4
votes
2answers
148 views

Why do XML namespace URIs use the http scheme?

A XML namespace should be a URI, but it can use any URI scheme, including those that are not URLs. Then why do all widely used XML namespaces use the http scheme (e.g. ...
1
vote
1answer
141 views

RESTful composition/inclusion of other resources

I have a few HTTP resources, and i'm wondering if including the models of one in the other is acceptable or if there is a cleaner method. In this example, we have a ton of "news" resources, and users ...
3
votes
2answers
135 views

Why HTTP Servers send information about themselves in HTTP Headers?

Most of the HTTP Servers I know send their application name and version in response http headers as default behaviour. (Nginx, IIS, Apache etc.) Of course we can change the default behaviour but I ...
-1
votes
3answers
171 views

A RESTful way to verify server state [closed]

I'm interested in building verifications into a REST service to help with service monitoring. For example, one could run assertions like ...
1
vote
0answers
271 views

Multiple long polling requests: bad idea?

I am designing a web server that handles multiple things such as a user-to-user chat, a user-to-group chat, friends request, forum etc. The chats have to be real-time chats, the friends requests ...
1
vote
1answer
331 views

Is it safe to generate client nonces using random number generator?

I am making HTTP calls on the client side and the server expects me to supply a client nonce. It needs to be 4 bytes long. I am planning to use this combination: base64(parts of the MAC address + ...
33
votes
3answers
3k views

What does HATEOAS offer for discoverability and decoupling besides ability to change your URL structure more or less freely?

Lately I've been reading about Hypermedia as the Engine of Application State (HATEOAS), the constraint that is claimed to make a web API "truly RESTful". It boils down to basically including links ...
0
votes
3answers
810 views

Why don't http headers include device resolution, pixel density, etc.?

I'm currently developing a responsive website with css media queries. It would be much easier if the server returned a different html/css for each viewport. I was wondering why couldn't the client ...