1

HttpResponse in “text/html” instead in “application/json” if using Name Credential

Step1 : Name Credential enter image description here

Step 2: Authentication & Authorization Code

enter image description here

RESPONSE enter image description here

header>>>>>: Server value>>>>>: myclient Authority Server

header>>>>>: Connection value>>>>>: keep-alive

header>>>>>: Content-Length value>>>>>: 475

header>>>>>: Date value>>>>>: Fri, 19 Jul 2019 02:36:00 GMT

header>>>>>: Content-Type value>>>>>: application/json

Step 3: After Authentication Calling further API with access token using name credential

enter image description here

ERROR RESPONSE: response in text/html instead in application/json enter image description here

header>>>>>: Server value>>>>>: awselb/2.0

header>>>>>: Connection value>>>>>: close

header>>>>>: Content-Length value>>>>>: 138

header>>>>>: Date value>>>>>: Fri, 19 Jul 2019 02:36:00 GMT

***header>>>>>: Content-Type value>>>>>: text/html***

Step 4: Added remote site settings enter image description here

Step 5: Instead Name Credentials using complete/direct API URL and getting SUCCESS response

enter image description here

In the above case using remote site setting I am getting SUCCESS response but we don't want to use remote site settings we would love to stick with the same procedure as authentication using name credentials which is working fine.

  • I think by using your named cred for the second call you’re duplicating the authentication (which is present in the named creds) already. I would use the straight url. – Sebastian Kessel Jul 19 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.