Search found 981 matches

by Scott Klement
Thu Apr 02, 2026 7:20 pm
Forum: General
Topic: sFTP with expect
Replies: 1
Views: 13080

Re: sFTP with expect

I suspect its sending the cd command immediately after the password, but the sftp server isn't ready for it yet, so ignores it.
Try adding a like that waits for the command prompt after sending the password.


#!/usr/local/bin/expect -f
set REMOTE_DIR "/cert_xxxx_name/in"
spawn sftp cert_xxxx_name ...
by Scott Klement
Sun Mar 29, 2026 10:47 pm
Forum: HTTPAPI
Topic: Support for *PUT Request Type
Replies: 8
Views: 79553

Re: Support for *PUT Request Type

In version 1.54 (now available from https://www.scottklement.com/httpapi ) the command-line tool now supports *GET, *POST, *PUT and *DELETE.

Let me know how it works for you
by Scott Klement
Fri Mar 27, 2026 12:33 pm
Forum: HTTPAPI
Topic: Support for *PUT Request Type
Replies: 8
Views: 79553

Re: Support for *PUT Request Type

Ahhhh, you are using the command interface for HTTPAPI, that's why I didn't understand you.

The current version is 1.53

The command interface hasn't been updated to support methods other than GET or PUT at this time. It could be updated, but hasn't been -- not many people use it (which makes me ...
by Scott Klement
Sun Mar 22, 2026 12:51 am
Forum: HTTPAPI
Topic: Support for *PUT Request Type
Replies: 8
Views: 79553

Re: Support for *PUT Request Type

HTTPAPI added support for the PUT request type in 2013. If you really don't have a version capable of using it, then you are VERY VERY far behind and succeptable to many security bugs, you need to update badly.

For example:

Code: Select all

dataReceived = http_string( 'PUT: url: dataToSend: 'application/json');
by Scott Klement
Thu Mar 19, 2026 2:32 pm
Forum: HTTPAPI
Topic: Support for *PUT Request Type
Replies: 8
Views: 79553

Re: Support for *PUT Request Type

HTTPAPI already supports PUT requests.

Use one of http_req(), http_string() or http_stmf() routines. Whichever one meets your needs.
by Scott Klement
Wed Mar 11, 2026 1:39 am
Forum: HTTPAPI
Topic: GSKit
Replies: 1
Views: 37114

Re: GSKit

You have to have both R and X authority to all of the directories in the path as well as *R to the actual certificate store files.

This is a copy/paste from the HTTPAPI readme file:

CHGAUT OBJ('/') +
USER(SCOTTK) DTAAUT(*RX)
CHGAUT OBJ('/QIBM') +
USER(SCOTTK) DTAAUT(*RX)
CHGAUT OBJ('/QIBM ...
by Scott Klement
Fri Feb 27, 2026 9:24 pm
Forum: HTTPAPI
Topic: HTTP/1.1 400 error when requesting new token
Replies: 1
Views: 55762

Re: HTTP/1.1 400 error when requesting new token

It is sending back this error:

{"error":"invalid_client"}


Does that mean anything to you?

My best guess is that something is wrong with your client id or client secret. But you could also any other possible meanings of the word "client" and use that for ideas of what to try.
by Scott Klement
Mon Feb 23, 2026 7:14 pm
Forum: HTTPAPI
Topic: Problem with Basic Authentication in HTTPAPI v1.53
Replies: 7
Views: 112305

Re: Problem with Basic Authentication in HTTPAPI v1.53

There's nothing in the IBM i operating system that strips authentication headers.

Furthermore, I can see "Authorization: Basic XXXXXXXXXXXXXXXXXXXX" being sent with your request, so it is definitely being sent.

It's possible that the webhook.site you are running in through could be stripping them ...
by Scott Klement
Sun Feb 22, 2026 3:51 am
Forum: HTTPAPI
Topic: Git Download Process Question
Replies: 3
Views: 73472

Re: Git Download Process Question


So I do a GIT pull request following this:

export PATH=/QOpenSys/pkgs/bin:$PATH
https://github.com/ScottKlement/httpapi.git


It's unclear what you mean by a "git pull request following this". And you aren't explaining what IFS directory you want the files to be placed in, or what you are doing ...
by Scott Klement
Sat Feb 21, 2026 3:09 am
Forum: HTTPAPI
Topic: Git Download Process Question
Replies: 3
Views: 73472

Re: Git Download Process Question

I don't understand.

What does 'IFS Home Src' mean exactly?

You refer to 'standard qsrc files'. I have no clue what you mean!!

You say "something in my export keeps pulling the git pull request into that home directory". What do you mean by 'export'? why would it be running git commands?