Skip to main content

Questions tagged [url]

1 vote
2 answers
222 views

Should non-browser applications connect to a URL?

I have written a game that users will download. When the game is started, I want it to automatically connect to the matchmaking server. Does that mean that, somewhere in the source code for the game, ...
Bobby's user avatar
  • 39
0 votes
0 answers
101 views

What's a good way to represent CRUD urls that require a parent id to work?

My website deals with states, which contain regions. So there will be a page called /states that lists states, and if you click on one, you get /state/{id}. Note 1: This is not a REST endpoint, but an ...
Joshua Frank's user avatar
1 vote
1 answer
3k views

Can I use POST request to read and transform data?

I'm developing an API that given a few parameters, reads the given data, transforms it and returns it as JSON. Eg. (some logic included) Request: POST /myApi/exportAsText Content-Type: application/...
Ruben Antonio Nunes Lousada's user avatar
9 votes
3 answers
14k views

REST API Design: Should the update (PUT) request include the ID in the resource URL?

When designing a REST API for update request. Usually PUT is used. Question: should the resource URL include the id usually? For instance, there is a book resource: http://localhost:8080/library/book ...
Rui's user avatar
  • 1,925
4 votes
0 answers
1k views

Is there a conventional URI scheme for local sockets (AF_UNIX)?

I'm looking at creating a class which accepts a string to define a Unix socket address. Linux supports three types of addresses for Unix sockets: File based addresses (also called named domain ...
Alexis Wilke's user avatar
0 votes
2 answers
609 views

Why don't URL shortening services just use an always incrementing number as the short URL?

It seems like the URLs are always Base encoded yielding a short string instead. Wouldn't it be easier from a design perspective to just use a number instead? Sure your urls could be "browsed"...
darkmoonstone's user avatar
-2 votes
2 answers
383 views

How can one choose between consistency and availability if the system you are designing is Tiny URL

I am putting together a system design for something similar to Tiny URL. It provides an API for mapping a URL to a short URL. Once created the short URL can be used to access the original URL. This ...
darkmoonstone's user avatar
1 vote
2 answers
489 views

URL shortening : data partitioning

I've been looking in many places about this question - most top Google search results are copy-pasted from a single source, and others are not particularly helpful. Not sure if I am allowed to include ...
Jeeves's user avatar
  • 121
0 votes
1 answer
137 views

How should I represent a UI state change in the URL?

My web application has a UI. Some aspects of the UI can be changed (e.g. the language, the theme, the text size). As a concrete example, let's assume that I have a "theme" dropdown box available on ...
Heinzi's user avatar
  • 9,868
-2 votes
2 answers
551 views

Alternative to RLE for short, infrequent runs

I have 3 number arrays that I need to encode into a URL through query parameters. Example: http://localhost:3000/?r=133223333302302040&y=10000000000000000000&b=13333332002100122331 This is a ...
Simon's user avatar
  • 127
7 votes
3 answers
4k views

How to deal with long URLs in comments that exceed the 80 characters limit?

I generally try to adhere to the 80 character limit for each line of code to satisfy my colleagues, to satisfy the linting tools, and to maintain an image of professionalism when random people look at ...
Flux's user avatar
  • 181
2 votes
0 answers
135 views

mod_rewrite should I define a url prefix for assets?

I am working on a little framework where I have this directory tree: project/ |--- ... (directories unrelated to the question) |--- public/ | |--- index.php .htaccess The .htaccess sends every ...
AymDev's user avatar
  • 121
1 vote
3 answers
371 views

If URLs are broken, and how to fix them

I have been having trouble clearly defining/specifying how a URL/URI should be applied to situations such as search queries or different resource formats. The question is what an actual "uniform ...
Lance Pollard's user avatar
3 votes
2 answers
2k 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/...
jnemecz's user avatar
  • 299
0 votes
1 answer
263 views

Trade-offs between explicit or implicit account id in a REST route

Please consider the following example (common in SaaS applications): This is a SaaS that deals with Widgets. You have an Account, that you authenticate via an API key. Each API key authenticates only ...
Victor's user avatar
  • 109

15 30 50 per page