× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: HTTP response message null when HTTP Status Code >= 300
  • From: Mihael Schmidt <mihael@xxxxxxxxxxxxxx>
  • Date: Tue, 15 Jan 2019 18:06:57 +0100
  • Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@rpgnextgen.com header.s=20140924 header.b=ArR8Oaj3; spf=neutral (google.com: 46.30.212.10 is neither permitted nor denied by best guess record for domain of mihael@xxxxxxxxxxxxxx) smtp.mailfrom=mihael@xxxxxxxxxxxxxx
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature; bh=NqdeaNXBUOGjjzxZCfvcYT5NMXHfflWCnkCPSU5RPjk=; b=CLXwcMLwgKAhuNN+MFgxFt9aspLe8lyRM+bge33YEWF6pd4WadWvctnTkK8xJZHlPz wCZHnPEbNYUzCxlI4Eb/IGfseSfo/30H/fUwlm9EblAlAxFeLMmx2qUWQMMtiDROxnQ1 m2jPMO1OTkJHNbuwq9da5yhR/ATQ8dr5DbOb7bGwSs3lBbZWAPlGPS4mtZ6v9M8cpMb3 hEwYoWbZQ1LlPIvqh8aGDoupO7d2NvHRjByU3INJ+RQinH+pv9Ql/CmskHVNzvsCzH/K TorbHec2f/p1oqSPhdw7xx23usRwynlLKW6XQPT1d1i1Vo/rXHmZ02ffkolOVqmpbpdE WZfA==
  • Arc-seal: i=1; a=rsa-sha256; t=1547572018; cv=none; d=google.com; s=arc-20160816; b=eX4qcTn5XaTNIAmU5d9e7fabm+AJhf8Vjdz2ukR5ljFR8HY3jDsUk2RAe28YV38TIH 0xuBNPn62pd1x6NFPrLgSntE+cSwZEqRYUtGqDlm7AZ1GHiZw7vJRVNhTCS7cinT5iNA KsiwM4VUkkrdyqBe8Llht7OMQJRjlQGligBxVmN/NtuJat2Gc0qMqB3rMm7TvkdoQG7g FoB1/nCV1N1v1DG0/ZbiSWtb+oqsEUeCdHkd/A69VNDaY2HTTo+MzXzXjn17bjcKDdC0 Hp9H8RpJfoS02awpjNjLqQbpyC2HVlmQ2OHaWaHLsxOp4qn67VNPeXwbWqGrq5/cFy8S P4EQ==
  • List-archive: <https://archive.midrange.com/rpg400-l/>
  • List-help: <mailto:rpg400-l-request@lists.midrange.com?subject=help>
  • List-id: "RPG programming on the IBM i \(AS/400 and iSeries\)" <rpg400-l.lists.midrange.com>
  • List-post: <mailto:rpg400-l@lists.midrange.com>
  • List-subscribe: <https://lists.midrange.com/mailman/listinfo/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=subscribe>
  • List-unsubscribe: <https://lists.midrange.com/mailman/options/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=unsubscribe>

Hi folks,

anybody some experience with the SQL HTTP functions? I am using SYSTOOLS.HTTPGETCLOBVERBOSE. But how do I get the content of the response message in an "error" case (f. e. HTTP Status Code 400 - Bad Request)?

|exec sql SELECT responsemsg, responsehttpheader INTO :responseMessage :responseMessageNull, :responseHeaderXml FROM TABLE( SYSTOOLS.HTTPGETCLOBVERBOSE(:wsUrl, :requestHeader)) AS t; |||

Everything works fine if the HTTP response has a status >= 200 and < 300 but else I get null in responsemsg. How do I get the message content when the HTTP response is not ok (HTTP status code >= 300)?

... and yes, the web service really returns data in the message body. I made the same request with curl.

Thanks in advance.

Mihael

||


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.