ObjFW  Diff

Differences From Artifact [fd787d72c8]:

To Artifact [4a244e4e24]:

  • File src/exceptions/OFHTTPRequestFailedException.m — part of check-in [12c09ef41e] at 2023-10-15 14:55:50 on branch trunk — Add OFHTTPRequestMethodString()

    This deprecates OFHTTPRequestMethodName(), which returns a C string.
    APIs should avoid C strings as much as possible.

    This function was initially only used internally, where this was fine.
    However, when it was made public, it should have been converted to
    OFString at the same time.

    Adds OFHTTPRequestMethodParseString() for consistency, which behaves the
    same as OFHTTPRequestMethodParseName() and deprecates it. (user: js, size: 1611) [annotate] [blame] [check-ins using] [more...]


57
58
59
60
61
62
63
64
65
66
67
68
69
70
	[_response release];

	[super dealloc];
}

- (OFString *)description
{
	const char *method = OFHTTPRequestMethodName(_request.method);

	return [OFString stringWithFormat:
	    @"An HTTP %s request with IRI %@ failed with code %hd!", method,
	    _request.IRI, _response.statusCode];
}
@end







|


|



57
58
59
60
61
62
63
64
65
66
67
68
69
70
	[_response release];

	[super dealloc];
}

- (OFString *)description
{
	OFString *method = OFHTTPRequestMethodString(_request.method);

	return [OFString stringWithFormat:
	    @"An HTTP %@ request with IRI %@ failed with code %hd!", method,
	    _request.IRI, _response.statusCode];
}
@end