Skip to content

URLRequest.ohhttpStubs_HTTPBody() method not found #259

@mplorentz

Description

@mplorentz

New Issue Checklist

Environment

  • version of OHHTTPStubs: 6.0.0
  • integration method you are using:
    • Cocoapods
    • Carthage
    • submodule
    • other
  • version of the tool you use: 1.3.1

Issue Description

I am having trouble using the ohhttpStubs_HTTPBody() method on URLRequest. When I try to use it I get a compilation error: "Value of type 'URLRequest' has no member 'ohhttpStubs_HTTPBody'".

I am running Xcode 9.0 (9A235) and building a Swift 4 project. I have uploaded a sample project that exhibits the issue.
ohhttpstubstest.zip

It looks like this was an issue in Swift 3 (#222) and version 6.0.0 was supposed to fix this issue.

The workaround given in #22 (request as NSURLRequest).ohhttpStubs_HTTPBody() does work for me, but I figured I would open a ticket since this is supposed to be fixed.

Complete output when you encounter the issue (if any)
Value of type 'URLRequest' has no member 'ohhttpStubs_HTTPBody'

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