Questions tagged [http]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
20 views

Basic network layer for a JSON API client

Just looking for some feedback/ways to improve this basic networking layer written in Swift. I'm still learning, please elaborate with as much detail as possible. ...
2
votes
1answer
64 views

Using Curl/Post to execute a HTTP request

I have a loop in a php file to HTTP_Request Server Via CURL->POST. But I don't know if I'm missing any security considerations. Also, is there a better way to perform this http request? ...
5
votes
2answers
91 views

HttpClient reusable instance for simple calls on another methods

I wrote a HttpClient instantiable class that will be used as reference to simplify API calls in other methods inside other classes, so the user could call it in a ...
2
votes
0answers
29 views

Rust HTTP Requester

I am writing an HTTP client for terminal, similar to curl, as a learning exercise. There's one limitation it suffers from and that is that it won't return until the client closes the socket. I fixed ...
0
votes
1answer
29 views

Python classes to grab HTTP response from website entities

I am trying to implement a parent WebContent class and child classes to grab HTTP responses from the actual website entities. There are highlevel codes below and I ...
3
votes
2answers
55 views

Generic function that accepts both Actions and Func's as parameters

I've created a generic try catch I can apply throughout my code so I'm not repeating myself. ...
0
votes
0answers
13 views

CLI to make HTTP Head requests and check for response code

I needed to create a simple CLI utility to check if a specific endpoint is available and (optionally) responds with some expected HTTP code to help troubleshoot users environments (proxy, network ...
4
votes
0answers
170 views

Simple routing in Rust

After my last attempt, I started to learn Rust again. This time I wrote a simple HTTP router. I would appreciate it if you could help me to fix my mistakes. Here is the link of the repository main....
12
votes
2answers
137 views

HTTP C++ Implementation

this is the first time I've requested a code review. I'm writing a piece of software in C++ that will use HTTP for communication. I wanted to do it myself to learn and then have someone review it and ...
14
votes
3answers
2k views

Simple HTTP Server

I'm working on a project (studying) and I have a lot of time for proof of concepts and write something from scratch. Basically I'm creating an HTTP server (simple, but not too simple) in C++ using ...
0
votes
1answer
38 views

Python code for handling HTTP cookies [closed]

We would like for a code review for our Python code. The code is written in Python 3.7 and is part of a class handling HTTP cookies. The code: ...
4
votes
0answers
49 views

Basic Python HTTP Server

It's an extremely simply HTTP server in Python using the socket library, and a few others to get the MIME type, etc... I've also avoided the ../../ vulnerability, ...
3
votes
1answer
115 views

Golang HTTP requests

I'm beginning to learn about Golang and I would like to have some advice about the following program. ...
3
votes
2answers
77 views

Download and save bulk URL concurrently

I am new to Go and wrote program to download and save bulk URLs concurrently. It is working correctly, but I would like to make it more efficient and follow best practices. ...
4
votes
1answer
136 views

Node.js http retry do while mechanism

I have implemented a simple do/while loop to handle a http request to a third-party. I don’t know when the data I receive will have elements in its array so I retry up to 10 times until the array ...
1
vote
0answers
40 views

Batch script to download and extract Node.JS and NPM packages

The following is my first real attempt at batch scripting, and I'm new to it so I'm not sure whether what I've done is to best practice. The code works, and I'm open to suggestions. Basically the ...
0
votes
0answers
19 views

Angular HTTP POST with Basic Auth and Form Data

I have an API that I need to use that requires 2 things Basic auth with user: username & password: api token The request ...
0
votes
0answers
18 views

Salesforce Live Agent Chat Client Code in Java

I have to use SwingWorker for the first time today, and I'm pretty pleased with the result. Would you mind helping check that I used it correctly? My class starts ...
0
votes
0answers
38 views

Download NASA images to use as Windows wallpaper

I made myself a simple script (Batch/JScript) that download a pic from a blog (APOD) & set it as wallpaper. ...
2
votes
1answer
50 views

Upload a file asynchronously

I need your opinion about my practice. I want to improve it. The requirements are the following: RESTFUL + OWIN (SelfHosted) Endpoint - Upload a file asynchronously Make a request to the endpoint ...
1
vote
0answers
29 views

Back-end web framework with sockets

I recently became interested in back end web frameworks in python, but I didn't want to use django or flask. (I want to make something similar to django or flask) So I decided to make my own. This is ...
2
votes
1answer
48 views

Batch downloading to file or memory

This is likely my first useful piece of Rust code. Planning to crate-ify it. It works. ...
0
votes
0answers
96 views

HttpListener Server for building reports in Excel

I have coded a web-based Excel file builder and sender, that serves the file over Http(example links in code). I would like to see improvements and any suggestions you might have. ...
2
votes
3answers
247 views

PHP HTTP request class

I would like to get you opinion on this class, which is used to send HTTP requests (at that moment only POST method). It is working ok, but I would like to get response on maintainability, ...
1
vote
1answer
56 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
36 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
33 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
48 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
212 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 ...
9
votes
1answer
124 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
152 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
26 views

Node.js HTTP server with request logging

Here is the code: ...
1
vote
0answers
344 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
589 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
102 views

Find if cookie name exists in the cookie string

I need to determine whether a cookie name is available or not in the cookie string. I have achieved this. We can use cookie-parser package but I don't want to use that package so I have written the ...
1
vote
1answer
102 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
1k 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
73 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
74 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
47 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
633 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
151 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
96 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
169 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
268 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/...
2
votes
1answer
354 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
96 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
3k 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: ...
2
votes
1answer
669 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: ...