You can post a json file with curl like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
| buf, bodyErr := ioutil.ReadAll(r.Body) | |
| if bodyErr != nil { | |
| log.Print("bodyErr ", bodyErr.Error()) | |
| http.Error(w, bodyErr.Error(), http.StatusInternalServerError) | |
| return | |
| } | |
| rdr1 := ioutil.NopCloser(bytes.NewBuffer(buf)) | |
| rdr2 := ioutil.NopCloser(bytes.NewBuffer(buf)) | |
| log.Printf("BODY: %q", rdr1) |
| package main | |
| import ( | |
| "context" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "google.golang.org/api/idtoken" | |
| ) |
| #!/bin/bash | |
| set -e | |
| GVERSION="1.8.3" | |
| GFILE="go$GVERSION.linux-amd64.tar.gz" | |
| GOPATH="$HOME/projects/go" | |
| GOROOT="/usr/local/go" | |
| if [ -d $GOROOT ]; then | |
| echo "Installation directories already exist $GOROOT" |
I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:
Set my args as follows:
const run = (async () => {
const args = [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-infobars',| pm2 start app.js --interpreter ./node_modules/.bin/babel-node |
| # overwrite master with contents of seotweaks branch (seotweaks > master) | |
| git checkout seotweaks # source name | |
| git merge -s ours master # target name | |
| git checkout master # target name | |
| git merge seotweaks # source name |
| // OS | |
| if(Ti.Platform.osname === 'iPhone' || Ti.Platform.osname === 'iPad') { | |
| var ios = true; | |
| } | |
| /** | |
| * Save file function | |
| * | |
| * @file: Binary file (Blob) | |
| * @filename: Name of file (String) |