cloudflare-client

Lightweight universal Cloudflare API client library for Node.js, Browser, and CF Workers (by kriasoft)

Cloudflare-client Alternatives

Similar projects and alternatives to cloudflare-client based on common topics and language

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better cloudflare-client alternative or higher similarity.

cloudflare-client reviews and mentions

Posts with mentions or reviews of cloudflare-client. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-07.
  • curl: (60) SSL certificate problem on Cloudflare Container
    2 projects | /r/homelab | 7 Dec 2022
    % docker run --entrypoint /bin/sh -it oznu/cloudflare-ddns:latest -c "curl -vvI https://api.cloudflare.com/user/tokens/verify" | grep -A 8 "Server certificate" * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=api.cloudflare.com * start date: May 19 00:00:00 2022 GMT * expire date: May 19 23:59:59 2023 GMT * subjectAltName: host "api.cloudflare.com" matched cert's "api.cloudflare.com" * issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3 * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed)
  • Dynamic Subdomain Routing
    1 project | /r/react | 6 Nov 2022
    this might workhttps://api.cloudflare.com/ based on what I found here https://community.cloudflare.com/t/create-a-subdomain-on-cloudflare-automatically/357063/2
  • Triggering Cloudflare Cache Purging with Netlify's Post-Deploy Hooks and a Google Cloud Function in Go
    2 projects | dev.to | 26 Jul 2022
    package purger import ( "fmt " "io" "log" "net/http" "strings" "github.com/GoogleCloudPlatform/functions-framework-go/functions" ) func init() { functions.HTTP("PurgeCache", purgeCache) } // httpError logs the error and returns an HTTP error message and code. func httpError(w http.ResponseWriter, err error, msg string, errorCode int) { errorMsg := fmt.Sprintf("%s: %v", msg, err) log.Printf("%s", errorMsg) http.Error(w, errorMsg, errorCode) } func purgeCache(w http.ResponseWriter, r *http.Request) { log.Printf("Received %s from %v", r.Method, r.RemoteAddr) if r.Method == "POST" { body, err := io.ReadAll(r.Body) if err != nil { httpError(w, err, "error reading POST body", http.StatusInternalServerError) return } log.Printf("Request body: %s", body) } // Send POST request to Cloudflare client := &http.Client{} data := `{"purge_everything":true}` req, err := http.NewRequest("POST", "https://api.cloudflare.com/client/v4/zones/ZONE_ID/purge_cache", strings.NewReader(data)) if err != nil { httpError(w, err, "error creating new Request", http.StatusInternalServerError) return } req.Header.Add("Authorization", "Bearer CLOUDFLARE-API-TOKEN") req.Header.Add("Content-Type", "application/json") cloudflareResp, err := client.Do(req) if err != nil { httpError(w, err, "error sending POST request", http.StatusInternalServerError) return } defer cloudflareResp.Body.Close() // Pass cloudflare response to caller cloudflareRespBody, err := io.ReadAll(cloudflareResp.Body) if err != nil { httpError(w, err, "error reading Cloudflare response", http.StatusInternalServerError) return } if cloudflareResp.StatusCode != http.StatusOK { msg := fmt.Sprintf("error non-200 status: %s", cloudflareRespBody) httpError(w, nil, msg, http.StatusInternalServerError) return } log.Printf("Cloudflare response: %s", cloudflareRespBody) _, err = w.Write(cloudflareRespBody) if err != nil { httpError(w, err, "error sending response to client", http.StatusInternalServerError) return } }
  • Cloudflare API Client Library
    1 project | /r/CloudFlare | 26 Jun 2022
    I've just built a small fetch-based, zero-dependency JavaScript library for Cloudflare API that works in Node.js, Deno, and CF Workers environment — https://github.com/kriasoft/cloudflare-client
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 10 May 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Stats

Basic cloudflare-client repo stats
4
20
2.6
almost 2 years ago

kriasoft/cloudflare-client is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of cloudflare-client is TypeScript.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com