I am using SwaggerHub for API documentation for my web application. When I use the bearer token for authentication, and I run a get request that is supposed to return a JSON of the user's trip information. It returns a 200 HTTP response, but the body response does not return the JSON information, instead it returns HTML text. The image below shows the result. Why is this happening?
I am using SwaggerHub for API documentation for my web application. When I use the bearer token for authentication, and I run a get request that is supposed to return a JSON of the user's trip information. It returns a 200 HTTP response, but the body response does not return the JSON information, instead it returns HTML text. The image below shows the result. Why is this happening?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
I am using SwaggerHub for API documentation for my web application. When I use the bearer token for authentication, and I run a get request that is supposed to return a JSON of the user's trip information. It returns a 200 HTTP response, but the body response does not return the JSON information, instead it returns HTML text. The image below shows the result. Why is this happening?
![200
Response body
<!doctype html><html lang="en"><head><meta charset
="utf-8"/> <link rel="icon" href="/favicon.ico"/><me
ta name="viewport" content="width=device-width, init
ial-scale=1"/><meta name="theme-color" content="#00
0000"/> <meta name="description" content="Web site c
reated using create-react-app"/><link rel="apple-to
uch-icon" href="/logo192.png"/><link
rel="manifest"
href="/manifest.json"/><title>React App</title><scr
ipt defer="defer" src="/static/js/main.834b06af.j
s"></script><link href="/static/css/main.073c9b0a.c
ss" rel="stylesheet"></head><body><noscript>You nee
d to enable JavaScript to run thi
div id="root"></div></body></htm]
Response headers
accept-ranges: bytes
alt-svc: h3=":443" ;ma=86400,h3-
29=":443";ma=86400,h3-27=":443";ma=86400
cache-control: no-cache
content-encoding: br
content-length: 246
content-type: text/html; charset=utf-8
date: Fri, 27 Jan 2023 21:52:16 GMT
etag:
Download
"681f9eeebc55900f3268e17eb7850a14ebb7f129de632fdda
6661921f5245e69-br"
expires: -1
last-modified: Fri, 13 Jan 2023 20:29:21 GMT
status: 304 Not Modified
vary: x-fh-requested-host, accept-encoding
x-cache: HIT
-b- ba
3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fc1602b80-c5b7-44a0-838e-9b62644e132e%2Ffaf13e69-c85e-4bcf-9982-84884d3f84ea%2Fwoshbu_processed.png&w=3840&q=75)
Transcribed Image Text:200
Response body
<!doctype html><html lang="en"><head><meta charset
="utf-8"/> <link rel="icon" href="/favicon.ico"/><me
ta name="viewport" content="width=device-width, init
ial-scale=1"/><meta name="theme-color" content="#00
0000"/> <meta name="description" content="Web site c
reated using create-react-app"/><link rel="apple-to
uch-icon" href="/logo192.png"/><link
rel="manifest"
href="/manifest.json"/><title>React App</title><scr
ipt defer="defer" src="/static/js/main.834b06af.j
s"></script><link href="/static/css/main.073c9b0a.c
ss" rel="stylesheet"></head><body><noscript>You nee
d to enable JavaScript to run thi
div id="root"></div></body></htm]
Response headers
accept-ranges: bytes
alt-svc: h3=":443" ;ma=86400,h3-
29=":443";ma=86400,h3-27=":443";ma=86400
cache-control: no-cache
content-encoding: br
content-length: 246
content-type: text/html; charset=utf-8
date: Fri, 27 Jan 2023 21:52:16 GMT
etag:
Download
"681f9eeebc55900f3268e17eb7850a14ebb7f129de632fdda
6661921f5245e69-br"
expires: -1
last-modified: Fri, 13 Jan 2023 20:29:21 GMT
status: 304 Not Modified
vary: x-fh-requested-host, accept-encoding
x-cache: HIT
-b- ba
3
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education