Questions tagged [http]

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

Filter by
Sorted by
Tagged with
2
votes
3answers
76 views

Combining PUT and POST on the same resource

I have the resource OrderRequest which I guess can be qualified as process. The OrderRequest can be create of update. The create should be idempotent, because creating the same order request 2 times ...
-3
votes
1answer
59 views

What exactly is HTTP/2 protocol

Saw below definition on https://http2.github.io/: What is HTTP/2? HTTP/2 is a replacement for how HTTP is expressed “on the wire.” It is not a ground-up rewrite of the protocol; HTTP methods, ...
1
vote
1answer
58 views

Difference between PID and HTTP-based health checks

I was reading the Cloud Foundry docs on Pushing Apps with Sidecar Processes. Under Limitations, there was a point stating health-checks: Sidecars only support PID-based health checks. HTTP ...
0
votes
1answer
73 views

Tomcat redirect HTTPS to HTTP

Made system update to temporarily disable HTTPS in our Tomcat server. Previous users are still using Https:// URL to access system and receive error message because it's disabled. Would like to ...
4
votes
1answer
140 views

Whatever happened to HTTP SEARCH? [closed]

It seems 5 years ago there was a proposal for a HTTP SEARCH request, but it does not appear to have been adopted and it not widely supported. Are there any factual documents or citations which shed ...
-2
votes
2answers
161 views

Should you use PUT or POST when an authenticated user is trying to update their own settings?

An example of my API is mydomain.com/v1/update-profile So the user is authenticated and wants to update some stuff in their profile. Should we design the API to expect a POST or a PUT HTTP Method? ...
3
votes
4answers
150 views

How to model correctly a non persistent action via REST API

Hi I have a Order this order needs to be sent to an order system. There are several oprations that can be performed. Create Modify Check-Modification (this happens on existing order) Simulate ...
0
votes
3answers
123 views

Which HTTP method to run an algorithm on input and return result?

I have a requirement to get input from a web app UI, send this input to the server who will run an algorithm on it. The web server will send back the output of the algorithm the the UI. Is an HTTP ...
-3
votes
1answer
242 views

How do I overcome the limit of 4000 results returned from the REST API?

I have an application which records the company man hours of employees and other related details. Because it gets updated everyday or when a new employee is added, it tends to lead to a very large ...
1
vote
2answers
59 views

Data Synchronization: How can I keep a parent record updated with its child totals efficiently?

I have an application that returns projects. A Project has many Tasks each Task has a field called hours. A project returns the total hours for all the Tasks that belong to it. My application ...
8
votes
1answer
881 views

Use 404 or 200 when null result (REST) [duplicate]

Let's assume we have an Entity { "id": 1 "inProgress": true, } We have endpoints: /api/v1/entities/ for fetching all entities, /api/v1/entities/1 for fetching entity with id = 1 /api/v1/...
2
votes
1answer
92 views

Does it make sense to qualify an error as an HTTP error without an HTTP client-server communication

I am writing a C# client SDK to a REST Api. This SDK sends JSON-serialized models to the API, and implements a first level of verification of the parameters. If the verification fails, it throws an ...
-1
votes
1answer
48 views

Is it okay to group multiple actions in a single http request

I have a view which displays a list of items related to one thing, it allows creation, removal of, and updates to these items. All changes only persists when the user hits save. Is it okay to group ...
1
vote
1answer
147 views

Which HTTP code has higher priority: 403 or 415?

Let's consider the following scenario. I need to access a resource hosted on server X. I want to get this resource in a Y format, so along with my request I send the Accept: Y header. Unfortunately X ...
2
votes
0answers
26 views

Differentiating HTTP bot traffic from regular users

I run a quite small website and I'd like to have some analytics about the traffic it gets from regular users. And I'd like to continue allowing bots to scrape it. I don't really care enough to invest ...
0
votes
1answer
52 views

Updating last resource access time when clients perform a GET

We have many clients which, upon start up, request a specific resource on the server using an HTTP API (not RESTful). This resource is - currently, identical for all clients. Naturally, since the ...
0
votes
2answers
98 views

What is a good strategy to queue incoming queries (posting to a c# controller)

I have a situation where clients are posting query requests to an endpoint (a c# controller method), and the controller takes the data they post and figures out what query they want, then calls a ...
1
vote
2answers
79 views

REST: How to reference existing resources in a HTTP POST request body?

This question relates to a somewhat more specific case than the one discussed in How can I create a RESTful calculator? It should be assumed that the values to be calculated are not simple integers, ...
1
vote
1answer
35 views

How HttpResponse is mapped back in case of dynamic IP?

I have dynamic IP provided by ISP. Say IP is x I type google.com in browser. Http request goes to google server IP changes to Y. How does http response comes back to my laptop/broswer when IP changed ...
2
votes
2answers
148 views

HTTP 404 for REST calls from client side (browsers)

I'm having troubles with the issue of distinguishing between "real" 404s and 404s where the path is correct but the id, for example, doesn't exist when it comes to client side apps. Most REST ...
0
votes
1answer
144 views

How to check if user is logged in after logging using http post?

I'm developing a Scrap app to extract some information from a sit. To get that information I have to be logged in to that site. So I use Http post and pass the data needed for login using FormData ...
0
votes
4answers
671 views

Is it worth logging HTTP requests when they enter an API server?

I'm designing an API and have reached the topic of logging. I'm going to store my logs in Elasticsearch. I'm certainly going to do some logging at the time the HTTP response is sent back to the ...
7
votes
1answer
271 views

HTTP code for action required

Suppose that I've an API that publishes a post in my Facebook account. What HTTP code should I return if the user hasn't linked yet his FB account with my API server (it's just an example)? I found "...
3
votes
1answer
215 views

How is it possible to GZIP a stream before the entire contents are known?

Two things you can do in Java: Send a gzipped JSON body in response to an HTTP request Send a StreamingOutput response to an HTTP request, where you begin sending a response before you know the ...
1
vote
1answer
58 views

Is it normal approch get all items after post new item?

Problem description: Parent view displays a list of items. This view has button add a new item to list wich open modal for creating a new item. Two approaches how to do that: 1) POST Request -> ...
1
vote
1answer
167 views

Currently serving big file (1.2GB) using HTTP/1.1, will HTTP/2 give better performance?

I have the single big file (1.2GB+) hosted on the server to download currently served using HTTP/1.1. We are exploring if we can move to HTTP/2 for better performance and security. All the places on ...
1
vote
1answer
63 views

Client-side XHR request, which IP does the endpoint read?

Assume a Javascript plugin, for a developer, that's included on their website. <script src="https://external.com/plugin.js"></script> The plugin makes a XHR request to a 3rd party ...
2
votes
1answer
310 views

How to structure your URIs?

I am making a web UI and an HTTP API for editing JSON documents in collaboration (role and versioning system). There are several types of JSON documents. Each type is described by a JSON schema, let'...
1
vote
1answer
39 views

RFC2616 (HTTP/1.1) client vs user agent (sec 1.3)

In Section 1.3 Terminology, RFC2616 (HTTP/1.1) says: client: A program that establishes connections for the purpose of sending requests. user agent: The client which initiates a ...
0
votes
0answers
18 views

W3C Reporting API - Mitigate spam/forged reports

I'm looking into the W3C Reporting API, which enables websites to instruct the client (browser) to send reports about: browser crashes, network errors, browser interventions etc. ouside the JS ...
0
votes
1answer
95 views

REST-like HTTP POST request with JSON

I am coding a poof-of-concept throw-away GCC plugin (see this for more context) which would use the HTTP 1.1 protocol to interact with my Bismon (GPLv3+ code on github, but unreleased; draft technical ...
-1
votes
2answers
47 views

Implementing http patch using less number of possible cases

Maybe this is stupid question but if I implement http patch, is there no good way to reduce the number of possible cases without exploding into a large number (2^n) of different cases depending on ...
1
vote
1answer
65 views

Batching CRUD of individual models that need to be linked

I have a few models which need to be linked together during a workflow on my webapp and I'm having trouble thinking of a nice abstraction for the api. They are represented as individual constructs on ...
-2
votes
1answer
43 views

over come HTTP client time out issue

I have an api end point which receives some parameters and process them returns a csv file. But the processing time may take more than 15 seconds. My server has build in timeout and some client ...
0
votes
1answer
416 views

When can an HTTP header have a non-string binary value?

The Browser Extensions Standard (which is based on the Chrome Extension API) includes a webRequest API with methods onBeforeSendHeaders and onHeadersReceived, allowing a browser extension to see and ...
-2
votes
2answers
76 views

REST API acceptable design flexibility

I design and works on lot of projects involves REST APIs. But one question is always occur to me if it is acceptable way to do REST. So according to REST manuals online, REST is build upon two major ...
0
votes
1answer
241 views

Retrieving JSON and image representation of a resource

I am developing a RESTful API designed primarily (but not exclusively) for consumption by a web application. For the purposes of this question, the API is a set of GET endpoints. The main endpoint is /...
1
vote
1answer
86 views

How does a party receiving frames under HTTP 2.0 know the order?

The frames are sent in multiplexed fashion and have a stream id. The receiver re arranges frames with the same stream id but what happens if an older frame arrives first? Is there a concept of ...
2
votes
3answers
1k views

can two web browser tabs be distinguished in a single-page application?

motivation and context I am designing and implementing the web interface of my bismon server program (a research prototype; in a few words: an orthogonally persistent, reflexive, homoiconic, ...
1
vote
1answer
87 views

Converting HTTP requests to MQTT and back again for smart home integration

We have an already running MQTT setup for communication between smart home devices and remote server, for remotely controlling the devices. Now we want to integrate our devices with Google Home and ...
0
votes
0answers
61 views

Two Web clients and Java server (HTTP and Websockets)

I have 3 software components of a Web Application: 1. JS-client application 1 (JSApp1) 2. Java Spring (REST and Websockets) server app (SRV) 3. JS-client application 2 (JSApp2) My current task is to ...
0
votes
0answers
71 views

HTTP Method and REST URL for Returning Data that May Be Saved

My application has a grid with a list of Car objects from a third party system [{id: 1, make: "Ford", model: "Focus", ...},...] The user can select a Car and use its data (after some transformation)...
-1
votes
1answer
74 views

How to determine the application used on top of TCP?

I am currently implementing a TCP Proxy Server. The huge problem I have right now is that, based on the clients' TCP data, I am trying to determine whether the client is making an HTTP, FTP or SMTP ...
2
votes
3answers
225 views

Permissive vs. Strict API Message validation

We had a interesting debate today over what our REST API should default to doing when validating a request body where unexpected fields are present. I think we ended the conversation in a good place, ...
0
votes
0answers
38 views

HTTP/REST and chained processing protocol/convention

Is there a protocol or a convention that supports REST (ok, maybe we should use HTTP here instead) processing chain and some neat features to help with that? Let me explain what I mean. Let's assume ...
0
votes
2answers
157 views

How do job queues return results to UI?

I am working on an app that will run queries and return results to UI. However, these queries can take a long time to finish so I should not wait for the result. As far as I know, people use task ...
1
vote
2answers
107 views

API design - indicate that results were truncated

For reasons, my search endpoint returns a maximum of 50 results. I'm struggling with how best to tell the caller that their results were limited to 50. The best I've come up with is returning some ...
0
votes
2answers
72 views

Should I put request context in path or in headers?

I'm designing a system that will Act as proxy calling a service on a back-end in context of user and his session Manage sessions for users on multiple back-ends I will expose the system over HTTP. ...
0
votes
1answer
52 views

Optimising network data usage in vehicle tracker

I'm currently working on an Android application that broadcasts the location of the device every 5 seconds. Pseudo showing current app process: deviceLocation = getLocation() if (hasChanged(...
10
votes
4answers
2k views

What should I do when optimistic locking doesn't work?

I have this following scenario: A user makes a GET request to /projects/1 and receives an ETag. The user makes a PUT request to /projects/1 with the ETag from step #1. The user makes another PUT ...

1 2 3 4 5 6