Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

HyperText Transfer Protocol - a textual system for representing web requests and replies.

0
votes
1answer
152 views

Why not put TLS certificate in DNS responses?

The security of a TLS connection relies on trusting the CA's certificate, which in turn, is usually actually a proof of DNS entry ownership. Even though the server operator may request a certificate ...
0
votes
1answer
93 views

Professionalism of implementing the HTTP “QUERY” method in an API

Some years ago, the w3c documented a proposal for a method called QUERY, where query information may be passed in as the request body rather than on the request line in query parameters. You can see ...
-1
votes
0answers
45 views

Request / Response Headers that Browser Pays Attention To

I have read that the Authorization header is non-standard, so people can pass authorization in all kinds of different ways with different headers, such as X-Auth instead of Authorization. I'm ...
0
votes
1answer
19 views

How to route/implement port forwarding with AWS/Apache web server (httpd) with a Node.JS app on port 3000?

I'm trying to understand this and having a hard time. I usually use Ubuntu server, with Apache2, and this time I am not. So I'm a bit out of my element. I'm also a software developer and I don't do ...
-1
votes
0answers
64 views

Python - Sending 1000's of HTTP requests, but only dealing with responses when they return

I'm trying to send thousands of http head requests, simply to see if the URL leads to a webpage. I check the status code for that: # Example code # import requests urlString = "http://www.google.com"...
3
votes
2answers
69 views

HTTP Methods - what about only using POST for Ajax calls?

You can find whole articles theorizing when you should use what METHOD in what edge case. It mostly comes down to this; every action needs to be simplified to in just four flavours (GET, POST, PUT, ...
-3
votes
1answer
30 views

Disable recieving messages from queue remotly

I have a CRUD like service which have REST HTTP API. This service have two instances - only one recieving request at time. If first instance starts throwing exceptions or slowing down we change load ...
3
votes
2answers
112 views

Proper URL structure in REST API to change status of one particular record

What's the proper URL structure in REST API for changing state of one particular record (e.g. change from "new" to "processed"). Now I work with this URL without request body: PATCH /employees/123/...
1
vote
2answers
151 views

What happen if we never dispose HttpClient, .Net C#?

I'm working on a windows service. Code of windows service is very simple but it has a strange manner! In windows service I should call a WebApi each 20 seconds and save the result in a SQL Database I'...
48
votes
10answers
8k views

What should be the http status code for “Service not available in your area” error?

Our service is in 5 cities right now. If someone tries to call our service API from any other city, we want to throw this error Service not available in your area. The question is, what is the ...
1
vote
1answer
62 views

Design: HTTP and Websockets working together

I'm at a bit of crossroads here and I wanted to ask the opinion of the community. I am creating a chat application for our company. Now, like every chat application out there, the messages are saved ...
0
votes
0answers
31 views

Data exchange between Chromium and a game client

I am creating a lightweight UI web app that will be embedded into a game client (PC) via chromium. This web app will be able to do a few simple actions and will communicate with an external REST API ...
1
vote
2answers
70 views

How much to log with 400 or 500 HTTP resonses?

In light of the recent Twitter logging bug, I've been thinking about something with my own web-app: how much information should I log in the event of a 400 or 500? I obviously don't want to be logging ...
-1
votes
0answers
59 views

Exposing two-way listening endpoint to future unknown-not yet developped clients

I'm facing a design choice dilemna for which I can't came up with a satisfying solution.... The question itself is kinf of hard to formulate... So... I'm writing an asp .net app hosted on IIS which ...
0
votes
0answers
129 views

What kind of information I should pass through a HTTP Header?

I was trying to find if there is some kind of reference about what type of informations are important to be passed on the HTTP Header. I understand that some information seems natural to be there, ...
2
votes
5answers
474 views

API “initialize” method: POST or GET?

We faced an issue with an API "init" method, and trying to understand if we must use GET or POST http method in context of REST. Preconditions: SPA on the frontend which communicates with our backend ...
1
vote
0answers
246 views

Are AJAX calls fully replaceable by requests sent via WebSockets?

I am redeveloping an application with the aim of going along with the more modern techniques. That is how I came across Socket.io, which I integrated with express.js. I implemented live searching ...
0
votes
1answer
99 views

Is a URC (Uniform Resource Citation) synonymous with a Query String or Url Parameters?

Reading this: https://renenyffenegger.ch/notes/development/web/URI-URL-URN-IRI-URC URCs provide a set of attribute/value pairs that describe properties of URIs like authorship, publisher, ...
0
votes
1answer
147 views

Web page accessing local system via localhost HTTP API

I have seen this pattern that allows web pages to interact with local system resources through a HTTP interface and I have a couple questions about it: What is this pattern called? What ...
1
vote
1answer
116 views

Rest API for supporting dual listbox

I'm trying to figure out what my API route and HTTP method should be for supporting a dual list box (e.g. http://geodan.github.io/duallistbox/sample-100.html) Say, I have a collection, GET /employees ...
0
votes
0answers
253 views

Design of api for spa applications

I have application for configuring e-commerce website (for example routing, page alliases, ordering, etc.). In old old times in server rendered applications I would have api like: POST/api/things/1/...
1
vote
0answers
117 views

CORS headers for non-200 HTTP responses

I'm specifying an API for a REST service. The REST service will be primarily accessed by web browsers using XHR requests running code hosted from remote origins. Therefore, I'll need to add CORS ...
0
votes
1answer
127 views

HTTP response code for proxy with expired connection resource

I am building a service which acts as a proxy to third party data providers for the end-user. My service uses tokens for authorization and if the user does not have a valid token it responds with 401 ...
3
votes
2answers
393 views

Can a caller abort an execution of code invoked by HTTP request? [closed]

A third party that is going to make HTTP requests to the API that I'm building, requires that the API responds in less than one second. My question is, do they have a way (literally any way) to abort ...
2
votes
1answer
140 views

Software architecture of IoT hardware controller program with embedded HTTP server

Just trying to design an architecture/class relations for my current C++ project in the IoT field. The program itself (controller) controls various hardware via an arm-based device. I intend to use ...
2
votes
1answer
324 views

Not prohibited, but disallowed — which http error code should I return?

I know that if user is forbidden in an admin's area, I should return 401 or 403 status error code. However, what I want to prohibit an admin for accessing a user's dashboard also? An admin has its own ...
0
votes
1answer
155 views

is the term “payload” is used exclusively in request?

Is the term "payload" used exclusively for the payload of (let's say http) request or it may be used to describe the useful information in the response of a request? If its used for both payloads (...
-2
votes
3answers
188 views

Is authentication equally important to encryption?

I am thinking how to implement the login of a new web application and as I search the net, most search result as about authentication instead of encryption. Assumption: The web application is ...
0
votes
1answer
188 views

Replacing HTTP with plain TCP in a client-server application

I'm building a small application composed of: Client (command-line) Business logic (remote server) It's a simple game of tick-tack-toe where the client sends information to the server about which ...
3
votes
1answer
70 views

Should a push hold data or make the receiver trigger an API call?

With WebSockets, when clients should be notified that data changed, I've seen two approaches: the server pushes the data modifications directly within the push; or the server pushes no data, and the ...
-4
votes
4answers
293 views

Is get and post interchangeable?

I know that there are some differences between GET and POST, like descriped in this post on StackOverflow. But what I cannot figure out is, are they interchangable, assuming that you change your code ...
1
vote
1answer
153 views

Split requests between different server applications

I currently have a web server running apache with multiple sites on it using virtual hosts. I want to add a service to my server that is using nodejs but I want it to be accessible under the same ...
0
votes
1answer
56 views

Disambiguating errors for the same HTTP status code

Assume I have two different error cases that logically have the same HTTP status code. What's the canonical way of providing data dependent on the error case in the response so that clients can ...
15
votes
6answers
2k views

REST endpoint to show a preview before POSTing

I'm designing a new web application which is powered by a REST backend and HTML+JS frontend. There's one POST method on it to change one entity (let's call Config), that has several side effects in ...
4
votes
3answers
489 views

Why do RESTful services that implement HATEOAS provide a self-relationship link?

I'm learning about HATEOAS and I noticed that every implementation always seems to implement a self-relationship first. For example a common response object might look like { title: "The Wonderful ...
4
votes
2answers
139 views

Are there worthwhile advantages to creating a separate docker container to handle http?

I've got a Python webapp running in docker container and a DB container/service, and I'm wondering if the apache/mod_wsgi functionality should be contained within the container that runs the python ...
1
vote
1answer
697 views

Spring4 error handling and HTTP status codes returned for REST services

We are writing Spring4 based REST services and had a question about returned HTTP status codes. It looks like the generally accepted approach is to let the app server or web server container handle ...
0
votes
1answer
410 views

Implement a HTTP server on top of NodeJS TCP APIs for learning purposes

I am very interested to learn the HTTP protocol in depth as well as understand the working of NodeJS streams up-close. I figured out that the best way to do this would be to develop an HTTP server in ...
0
votes
2answers
69 views

Making an HTTP request for a response without a layout

I'm making an application where the front-end can display resources both as themselves or within a modal. Of course, when the server gets a request for a resource in HTML, it's going to include a ...
2
votes
2answers
182 views

Is there a standard language for defining HTTP APIs?

For example, facebook and google have a lot of APIs, like getting data and doing actions on behalf of a user (backup files to Google Drive). I can read all of their documentation but I usually like ...
2
votes
0answers
431 views

Long lived connections

I have a custom non-blocking I/O server that supports (among other things) HTTP and websockets. I have two timeout concepts for connections: idle: connections that don't do anything are closed after ...
5
votes
3answers
1k views

How to decide the granularity for RESTful APIs

Most of us know SOLID, and over the years have understood how useful it can get when we need to change. Based on S & I parts of SOLID and from experience I used to design my HTTP RESTful services ...
3
votes
2answers
743 views

REST Web API: What should be returned? NotImplemented, BadRequest or Bad Design?

Let's say I have an enumeration of related information types and an enumeration of time periods. Also I have created two operations on a controller for retrieving data of those info types. Due to ...
-3
votes
1answer
515 views

What is the diffence between HTTPListener and a webservice

Im using C# as my development language. However I have some confusion over HTTPListener and a web service. Can you please explain what are the differences and advantages and possibly a situation in ...
5
votes
1answer
1k views

REST API caching strategy for collection of records

I am designing a REST API for my mobile clients to interact with our app server (built with Django/django-rest-framework if it makes any difference). There are a number of different objects ...
1
vote
2answers
510 views

Microservices, browsers and HTTP requests

In the old days we used to create a single .gif file for the entire application to avoid too many trips from the browser to the server. Similarly, we used to combine different types of information in ...
2
votes
2answers
1k views

REST: How to determine transient exceptions?

As I try to deal with the possibility of failure when I invoke RESTful endpoints or in general any HTTP endpoint I've been wondering if there is any standard or pattern in the HTTP specification or in ...
7
votes
1answer
169 views

What is (full) semantic transparency?

I was reading the RFC 2616 regarding HTTP/1.1 when this term came up: Therefore, the HTTP/1.1 protocol provides these important elements: [...] Protocol features that provide full semantic ...
3
votes
4answers
289 views

How to design HTTP endpoint which search for single resource instance and returns it with another, connected instance

I have an endpoint returning single-element collection (I didn't return just object-instance to keep consistent with resource-as-collection convention, so only get-by-id returns single instance) GET ...
8
votes
1answer
3k views

RESTful API and i18n: how to design the response?

We are designing a RESTful API that is mainly intended to meet the needs of a single client. Because of its very particular circumstances, this client has to make as few requests as possible. The ...