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

Questions tagged [http]

HyperText Transfer Protocol (HTTP) is an application level network protocol used for the transfer of content on the World Wide Web.

0
votes
1answer
39 views

C# HTTP proxy performance

I'm implementing HTTP traffic monitor (proxy) for my project right now. It's performance is satisfactory. I've updated regex settings and improved performance but I think there are also ways to make ...
1
vote
0answers
18 views

A syslog to Azure Log Analytics forwarder

I am using this code to forward my syslog logs (converted to json using syslog-ng) to Azure Log Analytics on an ARM board (since there is no official client for ARM)...
2
votes
0answers
18 views

Convert flat object hierarchy to json

I do work for a project currently, where the data is send to the server as application/x-www-form-urlencoded (which is bad, and it should be JSON, but unfortunately I am not able to change this one). ...
3
votes
1answer
35 views

PHP remote upload security

I need to upload images to a remote HTTP server from a local script. The image name format is {32-char MD5}.jpg. Server directory format is ...
3
votes
3answers
85 views

Parse a GET or POST string in C

This function takes a string from an HTTP POST or GET string, finds the specified variable, and allocates memory for the result and puts it in a string. The destination is given as an address of an ...
6
votes
0answers
94 views

Flight API querier

I am learning Go and wrote a small application that queries the Skyscanner API as my first attempt at learning. I was hoping someone more expert than me in the language could look over it at broad ...
1
vote
2answers
86 views

A simple HTTP server implementation in Java

I have implemented a simple HTTP server which can process GET and POST requests from the client. I have written it in Java. For ...
1
vote
0answers
22 views
1
vote
0answers
92 views

Python requests downloading big files in slower speed than wget

This is a simple toy downloader using python's requests library. I’ve monitored the download process is slower on an ethernet connected box. The realtime speed is ...
3
votes
2answers
125 views

Very basic C++ HTTP Parser

I was bored, so I decided to write a very basic HTTP Request/Response parser in C++. Some Notes: This isn't meant to be a complete implementation of the HTTP protocol This isn't meant to be the ...
1
vote
2answers
82 views

Find if cookie name exists in the cookie string

I need to find whether a cookie name is available or not in the cookie string. I have achieved this. We can use cookie-parser but I don't want to use the package so I have written the below code. Can ...
1
vote
1answer
49 views

Laravel image upload

I'm new to the filesystem from Laravel, but I need an upload script that allows users to upload images to my server. However, i'm concerned about securety, so I thought why not ask for advice, because ...
2
votes
1answer
156 views

Read gzipped JSON file from URL

I am requesting a JSON file that's gzipped. First, I download file: ...
1
vote
0answers
19 views

Differ returned web link from app scheme

I have a WebView, which loads the returned from a request url. The thing is, the url might ...
1
vote
0answers
56 views

Making multiple HTTP requests to Twitter

I need to make multiple http requests very fast. I've currently use this method. ...
1
vote
3answers
73 views

Always keep https in url

I wrote this recently, I thought I'd check if it was the best way to keep my url as an https at all times, any advice would be appreciated ...
4
votes
1answer
43 views

Python program that gets basic information on a Github user

I've created a basic Python CLI script, which takes a Github username, and returns some basic information associated with said username. I use the requests for HTTP requests (I'm new to this area) and ...
4
votes
1answer
244 views

Generating absolute URIs behind a reverse proxy

In my ASP.NET MVC application there are occasions where I need to generate an absolute URI, such as when sending an email confirmation link to a user. The most straightforward approach is to use ...
6
votes
1answer
149 views

Reading and returning the HTML content from a specified URL

I wanted to create a simple function that can read and return the HTML content from a specified URL. This is what reading here and there lead me to: ...
3
votes
1answer
76 views

HTTP Load test with Golang

I am a golang novice... I am trying to write an application that takes in many requests - up to a sustained 10000 HTTP posts/sec and post the payload to two back-ends in parallel (5 second timeout). ...
4
votes
2answers
94 views

Fetching data through HTTP and caching JSON result in a file

The task is to fetch some JSON data from an API with a GET request. If the location is not available for any reason, read a cache file. Otherwise write the cache file for future use. The following ...
1
vote
2answers
93 views

Python functions to fetch spreadsheets through SFTP and from Dropbox [closed]

I have written two functions- first one is to read files from SFTP and second one is to read files from Dropbox. Both functions have some similar line of code like validating extension and reading/...
0
votes
0answers
39 views

Asynchronous API handler function to update a game

I think mainly the GameController can use some optimization Game Entity.ts ...
2
votes
1answer
178 views

Measure website home page total network size in bytes

We have a requirement to check the size of some of our website home pages, in MB. This is to ensure that they are not growing too large, and that large images haven't been uploaded. I couldn't find ...
2
votes
1answer
79 views

PHP Template: Image file upload handler

I'm trying to develop some templates for common PHP tasks I've been dealing with. One of which is a general image file upload handler. So far I'm using the following reusable code which seems to be ...
3
votes
1answer
1k views

Simple server using async and HttpListener

I have a program that controls a custom machine. I wanted to add some simple HTTP comms so I could control it from the network or other programs. My server class is: ...
1
vote
1answer
311 views

Implementation of an OkHttp singleton for Android

I'm new to Android programming. I am going to make lots of HTTP requests: 500, 1k, 2k, 10k. I have tried to create a singleton class for OkHttp. I wrote this: ...
5
votes
1answer
82 views

Web page downloader that supports redirects

I wrote a class that downloads the HTML of a page from the internet. This class also manages redirects. This works well but I'm not very satisfied about time management for slower servers. In fact, if ...
3
votes
1answer
73 views

Construct and send an HTTP get request from scratch and print all the received data to the screen

My concerns: Is the code pythonic? Does the receive_all function make the code any cleaner or should that functionally be apart of the ...
3
votes
1answer
86 views

Issue tokens concurrently with synchronization per client

I have an API application with token authorization. A token is valid for one hour. Each business client has its own instance of the API application: ...
5
votes
1answer
53 views

Firefox add-on for highlighting insecure links

My first Firefox add-on puts a red border around insecure links, including plain HTTP links and links with a JavaScript event handler. The code is linted and appears to have good unit and acceptance ...
0
votes
0answers
102 views

Check PHP cURL script should work as required

I recently messed up and uninstalled some dependencies for a server that are a pig to get back. I think it's going to be easier and quicker to replace the package with cURL instead. Could someone ...
5
votes
2answers
169 views

Customizing errors based on HTTP status code in golang

I want to collect errors and its causes by defining custom errors (HTTP status 40x & 50x). For example, if user's request was bad, I want more specific reasons for the error. A customized error ...
3
votes
1answer
29 views

Handling download requests using PM2

I Using Nodejs v9.10.1 for handle download operation from another application. When using PM2 in fork mode to make alive my code. After 50 minutes, this will show high memory usage. Server Config is ...
3
votes
0answers
257 views

Making 10000 HTTP requests as fast as possible

I need a program that needs to gather data from large list of API end points. Below is a mock-up program that attempts to make 10000 requests as fast as possible. Any suggestions on how to improve on ...
4
votes
1answer
120 views

Testing validity of Proxy servers concurrently

I am trying to test the validity of a few thousand public proxy servers quickly. To do this, I am sending web requests using each proxy to a website such as example.com, and checking that no errors ...
3
votes
1answer
53 views

Creating a Basic Success Function for Http

I got sick of every time I make an Http request validating that the response was a success. I did a lot of: if response.class == Net::HTTPOK or ...
3
votes
1answer
183 views

Asynchronous file upload to disk

I have a simple webserver written in Python using aiohttp. My goal is a server that can receive many file uploads simultaneously and stream them all to disk. This ...
6
votes
3answers
2k views

Creating HTTP proxies for services

I have a HTTP client factory that creates a separate HTTP proxy instance for each of my services - which are in the cloud. The factory creates each instance on the basis of an interface which the ...
1
vote
0answers
35 views

HTTP request call for a token

The following code seems to have several redundant Flush, Close and Abort statements despite ...
3
votes
0answers
27 views

Testing whether pages can be fetched from two ports

I have an endpoint in my API which does a port test on 4455 and 4456 once a client GET's it. This is accomplished by requesting two web pages. The result will respond to the client with a JSON object: ...
3
votes
2answers
3k views

HTTP request parser in C

I'm implementing a simple HTTP server in C, and this is the first part of it. Basically, it takes a string containing a "raw" HTTP request, and parse it into a ...
0
votes
0answers
40 views

Mock Apple Push Notification server, using a goroutine

I picked up golang like a week ago and wrote an HTTP simulator to mimic Apple Push Notification Service server. What it does is receive a push notification request and returns 200, 400 or 500 back to ...
1
vote
1answer
171 views

HTTP download with dynamic reallocation and retries

This code is for downloading a file via winhttp lib, It's invoked by StartDownload function which tries to download n times before returning false if maximum tries ...
2
votes
0answers
35 views

Undocumented API client / wrapper in Python

Got the go ahead to make an API wrapper for an undocumented web API. Hoping to get some feedback on my code and design choice. I've been going back and forth and haven't been able to really feel ...
10
votes
1answer
137 views

Merging JSON and inserting into the DOM

I'm an aspiring junior dev. This is modified version of the code I wrote for a technical interview I did today (Didn't pass. Sad.). The problem was to fetch two json files, and display their data on a ...
7
votes
2answers
609 views

Repeatable HTTP requests in Python

I have a simple python script that's repeating a HTTP response/request. I would like to know how I could have constructed this better, particularly if there's a way I could have incorporated the slice ...
5
votes
1answer
122 views

Go web application with a mock user repository

I'm new to go and struggling to create structure of web application. I read about clean architecture and Ben Johnsons blog post about package layout. Now i want to put it all together. This is just ...
2
votes
0answers
816 views

RXJS queue up multiple http requests and send when x conditions happens

Just started to use rxjs few weeks ago, I think I'm getting most of it right, but my code seems to be not that efficient and prone to bugs I haven't run into yet! I need to be able to send http ...
0
votes
0answers
53 views

Load URLs from a CSV file and scrape HTML for images to download

This code uses a lot of memory (I think it's crappy code, since it gives the error of out of heap memory) What are your recommendations? This code grabs a html ...