Giter Site home page Giter Site logo

nasar165 / httpclient Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 74 KB

C based single thread Socket that uses HTTP protocol allowing simple connections to an API. The client is capable of sending POST to API as JSON.

License: GNU General Public License v3.0

C 75.98% Makefile 3.01% Shell 0.08% JavaScript 19.80% Objective-C 1.13%
c single-thread socket http-get http-post thread-safe dns-resolv

httpclient's People

Contributors

nasar165 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

morningblu

httpclient's Issues

Network is unreachable DNS resolver

Description

I'm trying to customize the package for my needs but I keep getting Network is unreachable and I don't know why.
The error isn't even printer I have to print the error myself.

Issue

An incorrect protocol is being used and an exception is being thrown causing the package to show nothing.
The current error that's slipping by is Network is unreachable errno 101.

Requirement

  • Handle network unreachable.

Testing calls

Description

I find it difficult to debug my request having to make API calls to external sites that I have no control over.

Issue

IT can be difficult to create specific test having to adjust to other sites specs, implementing a simple server
into the repo that can be modified will benefit the users with debugging.

Requirements

  • Add a node.JS server
  • The server must be capable of HTTP GET and PUT

Linked to

#8
#9

struct to handle http header

Description

I find it difficult to get information about the HTTP call that I just made is there a way to get specific information?

Issue

A lot of information is lost during the execution of the request, it would be good to store certain information in a struct for later usage.

Requirements

  • Create a struct to handle header content
  • struct will contain following properties/elements (protocol, URL, domain, port, IP, header, body
  • Fill all the elements in the struct with real values.

Obsolete function gethostbyname

Description

The function gethostbyname is marked as obsolete making the package unreliable for usage.

Issue

change the resolve function removing gethostbyname to utilize getaddrinfo.

Requirement

  • change function gethostbyname to getaddrinfo

Seperate request and response from server

Description

I need to send a request with specific values and then receive a response from the server. For now, all is mashed into the
Http struct making it difficult to differentiate from request data and the response data.

Issue

Response data and request data a merged into one HTTP struct making it difficult to know what is yours and what belongs to the server.

Requirement

  • rename the Get function in http source and header file.
  • pass two HTTP structs to the function one request and one response that is filled.

Handle exceptions errno

Description

I need a simple way to print expectation when they occur without having to repeat the same code again and again all over the package.

Issue

We want an easy way to handle error messages. without having to repeat the same text all the time.

Requirements

  • Print Exepction: print exception message to console.
  • Function can Kill app if needed: pass true false to function if you want it to exit on a specific exception.

Https Support

Description

I wish to use the HTTP client with https instead of just HTTP to secure my connection.

Issue

The HTTP client only supports HTTP without encryption making each request unsecured.

Requirements

  • implement https on each request
  • Add TLS support to Node.JS

Dependancy

#8 HTTP GET
#11 Node.JS

Http Get

Description

I want to send an HTTP request fetching data from a web API using the GET method

Issue

The package does not contain a socket connection capable of making a connection to a server using the HTTP protocol

Requirements

  • create a socket and connect to a server
  • Send a HTTP request trough the socket
  • Recive HTTP data
  • Manage Socket errros

Bug In DNS resolver

Description

I tried to enter a domain with a URL to fetch the content of the page and the CLI crashed.

Issue

The DNS resolver fails to fetch an IP if a user enters a domain trailed by a URL to a specific page or API method.

Requirements

  • Preprocess the domain separating the URL form the domain.

Domain to IP address

Description

I want to enter a domain instead of an IP address every time I wish to use this package it's mostly for convenience sake

issue

Everyone might not know the IP address of a domain allowing the package to resolve the domain and fetch the IP is easier.
especially if the IP address changes causing all operations to a halt.

Requirements

  • Resolve a domain into an IP address
  • Return the IP address
  • Manage exceptions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.