Using HTTP Integration with GET

Hello all,
I try send data to my server with get http integration.
Testing the receiption with device simulate uplink my server receive the integration call, but I don’t see any data in the query string:

BASH=/bin/sh
BASHOPTS=cmdhist:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING='set > dump_$(date +%Y%m%d%H%M%S).txt’
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]=“4” [1]=“2” [2]=“46” [3]=“2” [4]=“release” [5]=“x86_64-redhat-linux-gnu”)
BASH_VERSION='4.2.46(2)-release’
CONTENT_LENGTH=399
CONTENT_TYPE=application/json
CONTEXT_DOCUMENT_ROOT=/home/http/
CONTEXT_PREFIX=
DATE_GMT=
DATE_LOCAL=‘Monday, 19-Feb-2018 16:57:31 CET’
DIRSTACK=()
DOCUMENT_NAME=set.shtml
DOCUMENT_ROOT=/home/http/
DOCUMENT_URI=/p.shtml
EUID=48
GATEWAY_INTERFACE=CGI/1.1
GROUPS=()
HOSTNAME=fffff.cc.com
HOSTTYPE=x86_64
HTTP_ACCEPT_ENCODING=gzip
HTTP_HOST=www.panu.it
HTTP_USER_AGENT=http-ttn/2.6.0
IFS=’

LAST_MODIFIED=
MACHTYPE=x86_64-redhat-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
POSIXLY_CORRECT=y
PPID=940
PS4=’+ ‘
PWD=/home/http/
QUERY_STRING=
REMOTE_ADDR=10.10.10.10
REMOTE_PORT=53920
REQUEST_METHOD=GET
REQUEST_SCHEME=http
REQUEST_URI=/p/set.shtml
SCRIPT_FILENAME=/h/set.shtml
SCRIPT_NAME=/p/set.shtml
SERVER_ADDR=11.1.1.1
SERVER_ADMIN=fff@hhh.com
SERVER_NAME=www.www.com
SERVER_PORT=80
SERVER_PROTOCOL=HTTP/1.1
SERVER_SIGNATURE=
SERVER_SOFTWARE=Apache
SHELL=/sbin/nologin
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=1
TERM=dumb
UID=48
UNIQUE_ID=Worz65vq5fQy19IlK1ixoAAAAAI
USER_NAME=
=/bin/sh
comando='set > /home/dump
$(date +%Y%m%d%H%M%S).txt’

How i can see the data?
Thanks.

Alberto

Though indeed the integration allows you to specify any request method, even invalid ones:

image

…I wonder if it supports GET. Maybe it’s only supposed to support POST and PUT and maybe PATCH, so: any method that expects a request body?

Unless @johan can tell us more, I’d use POST rather than wasting time on GET. If you really want GET, then first test with https://requestb.in or FYI: TTN HTTP integration with 📩 Request Baskets instead of RequestBin.

https://putsreq.com allows you to change the POST request/body whatever, with JavaScript,
and pass it on to another webhook

eg: (for passing on only the payload fields)

var parsedBody = JSON.parse(request.body);
request.body = parsedBody.payload_fields;
request.forwardTo = 'YOURURI';

For a GET forward you stick your data onto the YOURURI as QueryString parameters

Indeed you can use PUT or PATCH. You can do a GET but since the content is in the body and not the query string, this can only be used to trigger and endpoint.

We don’t support GET and data in the query string like it’s 1998.

1 Like