Skip to content

HTTP request doesn't work on local network? #8

@FutureSkillz

Description

@FutureSkillz

This is a partial code snippet from my APIClient class. I have this method 'run' triggered by a button click.

The code is working for the first 'apiURL' variable for not for the 2nd which is my own locally running API. I know my local API is fine because I can hit it with Postman and my iPhone (same network).
Do you have any clue what might be happening? Thanks!

adamski::RestRequest request;
APIClient() : juce::Thread("APIClient Thread") {}
void run() override
{
	//juce::String apiUrl = "https://jsonplaceholder.typicode.com/todos/1"; //works
	juce::String apiUrl = "https://192.168.1.123:7031/get-single-anonymous"; //doesn't work

	auto response = request.get(apiUrl).execute();
	Logger::outputDebugString("response: " + response.bodyAsString);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions