The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
26 views

Sending Form Data and Image?

What is the way to send form data and image(s) to an http-server ? Should I go with Multipart/Form-Data or add the image content as a value to the json data with some key ? What are the ...
1
vote
1answer
30 views

Accessing internal API via Internal DMZ

I have an API that for firewall reasons can't sit on an internal DMZ and has to reside on the internal network. It was suggested that I build a 'shell' API that basically has all the same endpoints ...
0
votes
2answers
313 views

how do websites detect my screen resolution

http://whatsmyuseragent.com/ tells you your screen resolution, javascript enabled,user agent and local time etc? User agent is a part of HTTP header. How do they know about other information? I ...
0
votes
0answers
55 views

Should URL params and request params be stored in the Request object

Is it acceptable if GET parameters don't reside in the Request object, but in the URL? I am writing a small library in PHP, which is to represent the Request/Response as different entities and ...
1
vote
1answer
104 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
115 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 ...
3
votes
2answers
67 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 ...
1
vote
1answer
79 views

Purpose of authentication on API's?

After asking this question I found that I have a different question. What's the purpose of authenticating an API anyway? Take Twitter for instance. If you want to use this link to load some user's ...
3
votes
2answers
105 views

get All data vs get partial data Optimization

Let's say a client makes a GET call to the server to get all the followers of some user. now the client shows a list of all the followers but the only data the list needs is: {"username" : "user", ...
3
votes
1answer
390 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! ...
-3
votes
1answer
81 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?
0
votes
1answer
137 views

How should a REST API handle PUT when missing parameters?

I have a list of users that are being assigned to a certain office. I use checkboxes to select each user and when the client is done, a PUT is performed: PUT offices/:id users[0] : 14 users[1] : 12 ...
0
votes
0answers
80 views

faster method of testing uwsgi + nginx

Im currently looking for a way to test a lot of requests in the shortest amount of time possible on my web application. My current workaround is to just import the modules I want to test into another ...
24
votes
5answers
4k views

How do searches fit into a RESTful interface?

When designing a RESTful interface, the semantics of the request types are deemed vital to the design. GET - List collection or retrieve element PUT - Replace collection or element POST - Create ...
3
votes
2answers
178 views

How to indicate to a web server the language of a resource

I'm writing an HTTP API to a publishing server, and I want resources with representations in multiple languages. A user whose client GETs a resource which has Korean, Japanese and Trad. Chinese ...
0
votes
1answer
170 views

How to POST CSV with XMLHttpRequest

I would like to send a CSV file via POST in a XMLHttpRequest, but I am unsure of two things. First is there anything to distinguish a CSV file from a string split up by comma's? And what sort of ...
0
votes
1answer
34 views

How to use specific Request Header [closed]

I am learning how to work with XMLHttpRequests. I know that request.setRequestHeader() is an important factor. I just don't understand why. It took me a while but I have at least found a list of ...
2
votes
2answers
726 views

HTTP Session: A single object or multiple?

I tested two approaches to store session data: The classic: 1 key, 1 object (And every key as static final String in a class) "user" --> UserObject "preferences" --> List ... An ...
0
votes
1answer
85 views

Why can data sent from the server be in a variety of formats, but sent to the server it can only be a string

I recently ran into an error, I guess caused by my lack of understanding of how HTTP works, where I was sending a JSON object to the server to be stored in session data, and then sent back to the ...
2
votes
2answers
7k views

Is it safe to transmit access tokens via HTTP headers?

It's the first RESTful web service and I am concerned about security issues. Is it safe to transmit my access token via HTTP headers? For example: POST /v1/i/resource HTTP/1.1 Content-Type: ...
9
votes
2answers
6k views

How should a REST API handle PUT requests to partially-modifiable resources?

Suppose a REST API, in response to a HTTP GET request, returns some additional data in a sub-object owner: { id: 'xyz', ... some other data ... owner: { name: 'Jo Bloggs', role: ...
3
votes
1answer
749 views

The Request/Response Cycle

When User A decides he want to pay a visit to http://example.com/ it all begins with a Request. A short moment later he is given a Response. In this cycle Request-Response a lot is going on, in ...
3
votes
1answer
3k views

How to persist temporary data over multiple HTTP requests?

In our webapplication we have a list of questions that have to be answered by the user. These questions are served to the user one by one and will be saved once the last question has been answered. ...
2
votes
1answer
153 views

Choosing how to approach Geocoding Requests

I am about to begin writing a program in c# that will read Addresses from a source file create a Geocoding request, sent it to Google Maps API, get the response choose the coordinates from the xml and ...
0
votes
1answer
1k views

Security comparison between xmlHttpRequest and HttpRequest

Is there a difference between HttpRequest and xmlHttpRequest in terms of security? Is one more secure than the other? Is it more secure to send important data such as passwords via HttpRequest than ...
0
votes
2answers
506 views

NDIS Driver Filter VS API Hooking

I've seen many developers asking for "How to intercept in/out HTTP packets ", "How to modify them on the fly". The most "clean" answer I've seen is to make a kernel-mode-driver filter from the scratch ...
68
votes
6answers
7k views

Why shouldn't a GET request change data on the server?

All over the internet, I see the following advice: A GET should never change data on the server- use a POST request for that What is the basis for this idea? If I make a php service which ...
461
votes
2answers
59k views

Is the use of “utf8=✓” preferable to “utf8=true”?

I have recently seen a few URIs containing the query parameter "utf8=✓". My first impression (after thinking "mmm, looks cool") was that this could be used to detect a broken character encoding. So, ...
6
votes
3answers
826 views

How can I send audio input as chunked HTTP?

I am trying to create an interface with an external server, and don't know where to start. I would need to take audio as input to my computer, and send it to the remote server as a chunked HTTP ...
4
votes
2answers
1k views

Http handler for classic ASP application for introducing a layer between client and server

I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to ...
1
vote
1answer
4k views

REST and redirecting the response

I'm developing a RESTful service. Here is a map of the current feature set: POST /api/document/file.jpg (creates the resource) GET /api/document/file.jpg (retrieves the resource) DELETE ...
2
votes
2answers
385 views

How to trim all incoming values in an HTTP Post request?

I have an HTML form, with more than 30 fields in it. When this form is submitted to the server, all of the values of the fields should be trimmed. In other words, no value should start/end with any ...
5
votes
2answers
925 views

How can I best implement 'cache until further notice' with memcache in multiple tiers?

the term "client" used here is not referring to client's browser, but client server Before cache workflow 1. client make a HTTP request --> 2. server process --> 3. store parsed results into ...
3
votes
1answer
955 views

HTTP requests/responses analyser for Android

When using Firefox on my PC, for example, HTTP analysis is quite easy using for example the Net tab of Firebug. GETs, POSTs, etc., all there. What would be the best technique to see the HTTP ...
1
vote
1answer
149 views

Handling requests RESTfully?

There is a push in modern scripting frameworks to use RESTful request routing instead of a one-size-fits-all URL path routing. respond('GET', '/posts', callback); respond('POST', ...
1
vote
1answer
91 views

An application to get statistical data about HTTP Request/Response

I'm looking for an application which takes the address of a website, browses that website, and provides reports based on some user-defined criteria about the HTTP requests/responses. For example, this ...