Re: InvokeHttp - Response - Not readable
i tried with that user defined attribute as well earlier, but no luck :( -- Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
Re: InvokeHttp - Response - Not readable
Have you tried adding a user-defined property to InvokeHttp with name of "Accept" and value of "application/json" ? Any user defined properties should be sent as headers. On Mon, Apr 8, 2019 at 10:11 PM Puspak wrote: > > Thanks Bryan , > > I sent the floe file to a putfile and read it from there .the content looks > like below . > > > > > This portal requires browser which support > JavaScript. > Please make sure that you are using an updated browser and > that > JavaScript is enabled. > > > > > and please find the below properties those are set for my invokehttp .If > possible please let me know i something wrong over there .i donot have a > property Accept:application/json now but still the same issue. > > HTTP Method:GET > Remote > URL:http://somewebsite.something.com/json/someXML2/someInfoEx?somevalue=MO234=1=0 > SSL Context Service:No value set > Connection Timeout:5 secs > Read Timeout:15 secs > Include Date Header:True > Follow Redirects:True > Attributes to Send:No value set > Basic Authentication Username:poc > Basic Authentication Password:Sensitive value set > Proxy Configuration Service:No value set > Proxy Host:No value set > Proxy Port:No value set > Proxy Type:http > Proxy Username:No value set > Proxy Password:No value set > Put Response Body In Attribute:No value set > Max Length To Put In Attribute:2048 > Use Digest Authentication:false > Always Output Response:false > Trusted Hostname:No value set > Add Response Headers to Request:false > Content-Type:${mime.type} > Send Message Body:true > Use Chunked Encoding:false > Penalize on "No Retry":false > Use HTTP ETag:false > Maximum ETag Cache Size:10MB > > > > -- > Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
Re: InvokeHttp - Response - Not readable
Thanks Bryan , I sent the floe file to a putfile and read it from there .the content looks like below . This portal requires browser which support JavaScript. Please make sure that you are using an updated browser and that JavaScript is enabled. and please find the below properties those are set for my invokehttp .If possible please let me know i something wrong over there .i donot have a property Accept:application/json now but still the same issue. HTTP Method:GET Remote URL:http://somewebsite.something.com/json/someXML2/someInfoEx?somevalue=MO234=1=0 SSL Context Service:No value set Connection Timeout:5 secs Read Timeout:15 secs Include Date Header:True Follow Redirects:True Attributes to Send:No value set Basic Authentication Username:poc Basic Authentication Password:Sensitive value set Proxy Configuration Service:No value set Proxy Host:No value set Proxy Port:No value set Proxy Type:http Proxy Username:No value set Proxy Password:No value set Put Response Body In Attribute:No value set Max Length To Put In Attribute:2048 Use Digest Authentication:false Always Output Response:false Trusted Hostname:No value set Add Response Headers to Request:false Content-Type:${mime.type} Send Message Body:true Use Chunked Encoding:false Penalize on "No Retry":false Use HTTP ETag:false Maximum ETag Cache Size:10MB -- Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
Re: InvokeHttp - Response - Not readable
The response shows that the content type being returned is text/html; charset=utf-8 so that is why you can't see it in the content viewer. You could send the flow file to a PutFile processor to write it out to the filesystem and open it in a text editor to see what is being returned. If you are expecting json back, then maybe something is wrong with your configuration in InvokeHttp... you added a user defined property for Accept = application/json ? On Mon, Apr 8, 2019 at 11:07 AM Puspak wrote: > > Thanks Bryan for the quick response . > > Below is the complete details of the response . > Attribute Values > Cache-Control > no-store, no-cache, must-revalidate, post-check=0, pre-check=0 > Connection > close > Content-Length > 294 > Content-Type > text/html; charset=utf-8 > Date > Mon, 08 Apr 2019 11:08:25 GMT > Expires > Thu, 19 Nov 1981 08:52:00 GMT > Pragma > no-cache > RouteOnAttribute.Route > FFM > RouteOnContent.Route > unmatched > Server > CPWS > Set-Cookie > NACSID=d2c5350a1510b4fed30acf87207b32ab; path=/; secure; HttpOnly > filename > 232-62998983.json > fragment.count > 12 > fragment.identifier > b3b1da21-328d-4327-8074-a270519190cf > fragment.index > 4 > http.context.identifier > 3ab5f934-234c-429b-865a-dced0a594aed > http.headers.Accept > */* > http.headers.Accept-Encoding > gzip, deflate > http.headers.Cache-Control > no-cache > http.headers.Connection > keep-alive > http.headers.Content-Length > 765 > http.headers.Content-Type > text/plain > http.headers.Host > hostname.com:9990 > http.headers.Postman-Token > 4da38cf1-f2f3-40a3-866f-b59e15ccf9ec > http.headers.User-Agent > PostmanRuntime/7.6.0 > http.local.addr > 143.261.50.23 > http.local.name > 159.521.40.23 > http.locale > en_US > http.method > POST > http.protocol > HTTP/1.1 > http.remote.addr > 159.521.40.23 > http.remote.host > 159.521.40.23 > http.request.uri > /lll/ddd/xxx/msg > http.request.url > http://hostname.com:9990/lll/ddd/xxx/msg > http.server.name > hostname > http.server.port > 9990 > http.servlet.path > Empty string set > invokehttp.request.url > http://somewebsite.something.com/json/someXML2/someInfoEx?somevalue=MO234=1=0 > invokehttp.status.code > 200 > invokehttp.status.message > OK > invokehttp.tx.id > 0f7e2049-ae0f-43b6-a439-00ce86dfc7d9 > mime.type > text/html; charset=utf-8 > msgFormat > EDT > msgType > FGF > path > ./ > segment.original.filename > 08062ff0-010d-45a6-a27e-56709a6f441e.json > uuid > e985bd29-2a05-4060-a214-3018f11c697f > > > > The response code is 200 , and i am able to access it through postman > perfectly . Gives me desired output > > > > -- > Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
Re: InvokeHttp - Response - Not readable
Thanks Bryan for the quick response . Below is the complete details of the response . Attribute Values Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection close Content-Length 294 Content-Type text/html; charset=utf-8 Date Mon, 08 Apr 2019 11:08:25 GMT Expires Thu, 19 Nov 1981 08:52:00 GMT Pragma no-cache RouteOnAttribute.Route FFM RouteOnContent.Route unmatched Server CPWS Set-Cookie NACSID=d2c5350a1510b4fed30acf87207b32ab; path=/; secure; HttpOnly filename 232-62998983.json fragment.count 12 fragment.identifier b3b1da21-328d-4327-8074-a270519190cf fragment.index 4 http.context.identifier 3ab5f934-234c-429b-865a-dced0a594aed http.headers.Accept */* http.headers.Accept-Encoding gzip, deflate http.headers.Cache-Control no-cache http.headers.Connection keep-alive http.headers.Content-Length 765 http.headers.Content-Type text/plain http.headers.Host hostname.com:9990 http.headers.Postman-Token 4da38cf1-f2f3-40a3-866f-b59e15ccf9ec http.headers.User-Agent PostmanRuntime/7.6.0 http.local.addr 143.261.50.23 http.local.name 159.521.40.23 http.locale en_US http.method POST http.protocol HTTP/1.1 http.remote.addr 159.521.40.23 http.remote.host 159.521.40.23 http.request.uri /lll/ddd/xxx/msg http.request.url http://hostname.com:9990/lll/ddd/xxx/msg http.server.name hostname http.server.port 9990 http.servlet.path Empty string set invokehttp.request.url http://somewebsite.something.com/json/someXML2/someInfoEx?somevalue=MO234=1=0 invokehttp.status.code 200 invokehttp.status.message OK invokehttp.tx.id 0f7e2049-ae0f-43b6-a439-00ce86dfc7d9 mime.type text/html; charset=utf-8 msgFormat EDT msgType FGF path ./ segment.original.filename 08062ff0-010d-45a6-a27e-56709a6f441e.json uuid e985bd29-2a05-4060-a214-3018f11c697f The response code is 200 , and i am able to access it through postman perfectly . Gives me desired output -- Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
Re: InvokeHttp - Response - Not readable
Hello, Can you provide more information about the response? what is the http status code? what is the body of the response? Can you make the same request using curl ? -Bryan On Mon, Apr 8, 2019 at 7:16 AM Puspak wrote: > > Hi team , > My invokehttp is making a get call over http , but the response i am getting > not able to read . > > when i am reading the flow file i can only see "No viewer is registered for > this content type." I tried various option to get the json response , but > no luck. > > approach i tried : > 1 Accept : application/json > 2 AlwaysoutputResponse : Content-type= application/json > > Please suggest > > > > -- > Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/