Answer
This is a CORS (Cross-Origin Resource Sharing) restriction being enforced by the browser — Postman doesn't enforce CORS the way browsers do, which is why it works there regardless. Add an Access-Control-Allow-Origin header to the HTTP response, either set to * to allow any origin, or scoped to a specific list of known, trusted URLs instead of * for a more locked-down setup. This needs to be configured on the server/API side rather than worked around by disabling browser security settings, which isn't viable for real end users anyway.